Chapter 1: Exploring Linux Command Line Flashcards
GNU Born Again Shell
This is <b>bash</b>. It’s the most common shell, and was built upon the Bourne shell.
Bourne
This is <b>sh</b>. <b>sh</b> is now usually a pointer for another shell.
<b>tcsh</b>
Based on C shell, no major distributions default to it, but it’s fairly popular to a dedicated croud. It’s pretty similar to <b>bash</b>.
<b>csh</b>
C shell. It’s not used much anymore.
<b>ksh</b>
Korn shell. It was designed to combine the best elements of <b>sh</b> and <b>csh</b>. It has a small, dedicated following.
<b>zsh</b>
Z shell. It’s an evolution of <b>ksh</b>.
Default interactive shell
This is the shell that the user makes use of to interact with Linux.
Default system shell
This is the shell used by Linux to run system shell scripts, usually at startup.
<b>uname</b>
This displays your operating system. <b>uname -a</b> will give you a more verbose display.
Internal vs. External commands
You can determine whether a command is a built-in with <b>type</b>
<b>$type cd
cd is a shell builtin
$</b>
How do you run an external command when you have an internal command of the same name installed?
You have to type the whole directory path to it, because internal commands take precedence.
<b>$/bin/pwd
/root
$</b>
<b>chmod</b>
This command is used to change the executable status of a file.
Command Completion
If you’re lazy, you can hit tab while you’re typing in the command line and it will go through auto complete options that it thinks you may want
Command history
You can up arrow to go through the commands you’ve typed, or you can ctrl+R to search for commands you’ve typed.
Invoke a text editor
Type ctrl+x followed by ctrl+E. This launches the editor defined by <b>$FCEDIT</b> or <b>$EDITOR</b>.
- It will launch Emacs as a last resort.
- If you prefer vi to Emacs, type <b>set -o vi</b>
How do I retrieve and run the last command I ran?
With <b>!!</b> <b>$!! type -a pwd pwd is a shell builtin pwd is /bin/pwd $</b>
How do I clear my command history?
<b>history -c</b>
Where is my bash history contained?
in <b>/home/.bash_history</b>
<b>touch</b>
This is used to create an empty file.