← Cheat Sheets

Terminal Line Editing Shortcuts

Move and edit faster at the prompt (bash/zsh).

# Terminal Line Editing Shortcuts

Move and edit faster at the prompt (bash/zsh).

| Keys | Action |
|---|---|
| Ctrl+A / Ctrl+E | Start / end of line |
| Alt+B / Alt+F | Back / forward one word |
| Ctrl+U | Delete to start of line |
| Ctrl+K | Delete to end of line |
| Ctrl+W | Delete previous word |
| Ctrl+R | Search history |
| Ctrl+L | Clear screen |
| Ctrl+C | Interrupt command |
| Ctrl+D | End input / exit shell |
| `!!` | Repeat last command |
| `!$` | Last argument of previous command |
| Tab | Autocomplete |