In Bash and ZSH default key shortcuts are emacs
style, a vim
style exists.
20 raccourcis clavier du shell (Bash, ZSh) en mode emacs
le réglage par
défaut. Un mode vim
existe.
1. Controlling processes
Keys |
Description |
CTRL+C |
Close the process running in foreground |
CTRL+Z |
Suspend current process, it goes Zzz |
2. While typing commands
Keys | Description |
---|---|
CTRL+R |
Recall a previous command |
TAB |
Auto-complete files and folder names, also commands and options with ZSH |
CTRL+C |
Clean the line |
3. Correcting text
Keys | Description |
---|---|
CTRL+_ |
Undo the last key press. Can be repeated. |
CTRL+T |
Toggle the last 2 characters; |
4. Moving
Keys | Description |
---|---|
CTRL+A |
Go to the begining of the line (like Home) alpha |
CTRL+E |
Go to the end of the line (like End) |
Alt+F |
Move 1 word forward, CTRL+F 1 character |
Alt+B |
Move 1 word backward, CTRL+B 1 character |
5. Cut / paste
Keys | Description |
---|---|
CTRL+H |
Cut 1 char before the cursor (like Backspace) |
CTRL+W |
Cut 1 word before the cursor |
CTRL+U |
Cut the part of the line before the cursor (Undo) |
CTRL+K |
Kut the part of the line after the cursor |
CTRL+Y |
Paste (yank) the last cut string |
6. Controlling the terminal
7. Bonus
Keys | Description |
---|---|
CTRL+M |
Alternative to Enter |