Navigating the Bash Shell
Modern shells provide useful “hotkey” commands that can save considerable typing. The control- notation means that the Ctrl
(control) key and the following key should be depressed at the same time.
Function | Key |
---|---|
Tab completion: expand typed string to as far as it has a unique name. | tab |
Search for earlier command | control-r |
Move to the beginning of the line | control-a |
Move to the end of the line | control-e |
Clear the screen | clear or control-l |
Arrow Keys
When using bash you may use its built-in history mechanism to save yourself some keystrokes.
Function | Key |
---|---|
scroll through the previous commands you have typed | up arrow |
if already scrolled back, scroll to more recent commands | down arrow |
edit text on a line | right or left arrow |
Logging Out
To log out of a shell, type exit
exit
This logs you out of your current terminal window. If that is a login window, for example your ssh
shell, it will log you out of the system entirely.