1/11
A set of flashcards to help review key concepts and details related to UNIX Shells.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
What is the shell in UNIX?
The shell is an interface between the user and the system that runs other UNIX commands.
What command checks which shell you are using?
You can check your current shell by using the command 'printenv SHELL' or 'echo $SHELL'.
What does the environment variable PS1 control?
PS1 determines the appearance of your command prompt.
What happens if you "unset PS1"?
You will have no prompt, which is confusing.
What file stores the bash history?
The bash history is stored in a hidden file called .bash_history in your HOME directory.
How can you repeat the last command in bash?
You can use the shortcut '!!' to repeat the last command.
What does '!*' do in bash history?
'!*' allows you to run a different command with the same arguments, excluding the first word.
How do you create an alias in UNIX?
You can create an alias using the command 'alias NAME="COMMAND"'.
What is the purpose of aliases in UNIX?
Aliases are used to create another name for a command, often including specific flags.
What is the difference between .profile and .bashrc?
.profile and .login are read once at login, while .bashrc is run every time a new shell is created.
What command is used to view your command history?
The command 'history [NUMBER]' shows your most recent commands.
What feature of different shells can make them appealing?
Different shells have features that vary, making them appealing based on user needs.