si:bash
Bash Shortcuts
Terminal
By EZ4Code Team
Line Editing
10| Shortcut | Description | Platform |
|---|---|---|
| Ctrl+A | Move to start of line | all |
| Ctrl+E | Move to end of line | all |
| Ctrl+B | Move back one char | all |
| Ctrl+F | Move forward one char | all |
| Alt+B | Move back one word | all |
| Alt+F | Move forward one word | all |
| Ctrl+W | Delete word before cursor | all |
| Ctrl+U | Delete to start of line | all |
| Ctrl+K | Delete to end of line | all |
| Ctrl+Y | Paste (yank) killed text | all |
History
7| Shortcut | Description | Platform |
|---|---|---|
| Ctrl+P | Previous command | all |
| Ctrl+N | Next command | all |
| Ctrl+R | Reverse search history | all |
| Ctrl+S | Forward search history | all |
| Ctrl+O | Execute & advance | all |
| !! | Run last command | all |
| !$ | Last arg of last command | all |
Job Control
7| Shortcut | Description | Platform |
|---|---|---|
| Ctrl+C | Interrupt (SIGINT) | all |
| Ctrl+Z | Suspend (SIGTSTP) | all |
| Ctrl+D | Send EOF / exit shell | all |
| Ctrl+\ | Quit (SIGQUIT) | all |
| bg | Resume job in background | all |
| fg | Resume job in foreground | all |
| jobs | List active jobs | all |
Redirection
7| Shortcut | Description | Platform |
|---|---|---|
| > | Redirect stdout to file | all |
| >> | Append stdout to file | all |
| 2> | Redirect stderr | all |
| 2>&1 | Redirect stderr to stdout | all |
| < | Redirect stdin from file | all |
| | | Pipe stdout to next command | all |
| tee | Tee output to file & stdout | all |
Shortcuts
6| Shortcut | Description | Platform |
|---|---|---|
| Ctrl+L | Clear screen | all |
| Ctrl+T | Swap last two chars | all |
| Ctrl+_ | Undo | all |
| Tab | Autocomplete | all |
| Alt+. | Insert last arg | all |
| Ctrl+X Ctrl+E | Edit command in editor | all |