Movement, keyboard commands and shortcuts for the GNU Bourne-Again SHell.
| Command | Keyboard Character |
|---|---|
| command | ⌘ |
| control | ⌃ |
| alt | ⎇ |
| delete | ⌫ |
| option | ⌥ |
| shift | ⇧ |
| caps lock | ⇪ |
| tab | ⇥ |
| arrow up | ↑ |
| arrow down | ↓ |
| arrow left | ← |
| arrow right | → |
| escape | ⎋ or ␛ |
| return/enter | ⏎ or ⌤ |
| home | ↖ |
| end | ↘ |
| page up | ⇞ |
| page down | ⇟ |
- ⌃a - Beginning of line (Home)
- ⌃e - End of line (End)
- ⎇b - Back one word
- ⎇f - Forward one word
- ⌃xx - Toggle between the start of line and current cursor position
- ⌃f - Forward one character
- ⌃b - Backward one character
- ⌃l - Clear the screen
- ⌃w - Delete the Word before the cursor
- ⎇d - Delete the Word after the cursor
- ⎇⌫ - Delete the Word before the cursor
- ⌃u - Cut the text before the cursor
- ⌃k - Cut the text after the cursor
- ⌃k - Cut the text after the cursor
- ⇧Insert - Paste at the cursor
- ⌃⇧<codepoint> - Insert unicode character at cursor
- ↑, ⌃p - Previous command
- ↓, ⌃n - Next command
- ⌃r - Search previous command history mode
- ⌃g - Escape from Search previous history mode
- !! - Repeat last command
There is much confusion about how .bashrc and .bash_profile are read. This
article explains the issue.
To summarize: A login shell means that you got the shell after authenticating to the system, usually by giving your user name and password. Files read:
~/.bash_profile
A non-login shell means that you did not have to authenticate to the system. For instance, when you open a terminal using an icon, or a menu item, that is a non-login shell. Files read:
~/.bashrc
For this reason, to unify the environments between both login and non-login
shells, the .bashrc file should source the .bash_profile file.