Linux Terminal Keyboard Shortcuts — Complete Cheatsheet
The Linux Terminal is a powerful tool for system administration, development, and automation. Mastering its keyboard shortcuts can significantly boost your productivity and efficiency, allowing you to navigate and execute commands with lightning speed.
Upgrade Your Workflow: MX Master 3S Mouse
Pair your shortcuts with the ultimate developer mouse. Silent clicks, 8K DPI tracking, and hyper-fast scrolling.
Shortcuts
| Action | Windows | Mac | Category |
|---|---|---|---|
| Clear the screen | Ctrl+L | Cmd+L | Navigation & Editing |
| Move cursor to beginning of line | Ctrl+A | Cmd+A | Navigation & Editing |
| Move cursor to end of line | Ctrl+E | Cmd+E | Navigation & Editing |
| Move cursor one word backward | Alt+B | Option+B | Navigation & Editing |
| Move cursor one word forward | Alt+F | Option+F | Navigation & Editing |
| Delete character before cursor | Backspace | Delete | Navigation & Editing |
| Delete character under cursor | Ctrl+D | Cmd+D | Navigation & Editing |
| Delete from cursor to end of line | Ctrl+K | Cmd+K | Navigation & Editing |
| Delete from cursor to beginning of line | Ctrl+U | Cmd+U | Navigation & Editing |
| Paste last cut text | Ctrl+Y | Cmd+Y | Navigation & Editing |
| Search command history (backward) | Ctrl+R | Cmd+R | History & Search |
| Search command history (forward) | Ctrl+S | Cmd+S | History & Search |
| Recall previous command | Up Arrow | Up Arrow | History & Search |
| Recall next command | Down Arrow | Down Arrow | History & Search |
| Interrupt/Stop current process | Ctrl+C | Cmd+C | Process Control |
| Suspend current process (send to background) | Ctrl+Z | Cmd+Z | Process Control |
| Exit current shell | Ctrl+D | Cmd+D | Session Management |
| Autocomplete command/path | Tab | Tab | Productivity |
| Swap last two characters | Ctrl+T | Cmd+T | Navigation & Editing |
| Capitalize word under cursor | Alt+C | Option+C | Navigation & Editing |
| Make word under cursor lowercase | Alt+L | Option+L | Navigation & Editing |
| Make word under cursor uppercase | Alt+U | Option+U | Navigation & Editing |
| Repeat last argument of previous command | Alt+. | Option+. | Productivity |
Tips
- Practice regularly: The best way to internalize shortcuts is to use them consistently. Try to replace mouse interactions with keyboard shortcuts whenever possible.
- Learn in chunks: Don't try to memorize everything at once. Focus on a few shortcuts that you'll use most frequently, master them, and then add more to your repertoire.
- Understand your shell: Many shortcuts are specific to your shell (e.g., Bash, Zsh). Familiarize yourself with your shell's documentation for advanced customization and features.
- Combine shortcuts: Many powerful workflows involve chaining multiple shortcuts together, such as `Ctrl+R` to find a command, then `Ctrl+A` to edit it at the beginning.
Frequently Asked Questions
How do I see all Linux Terminal shortcuts?
There isn't a single universal command to list 'all' shortcuts, as many are shell-specific (like Bash or Zsh) and some are terminal emulator specific. For Bash, you can use `bind -P` to list all keybindings. For Zsh, `bindkey` provides similar information. Consult your shell's manual (`man bash` or `man zsh`) for comprehensive details.
Can I customise Linux Terminal shortcuts?
Yes, absolutely! Most modern shells like Bash and Zsh allow extensive customization of keybindings. For Bash, you can modify your `~/.inputrc` file. For Zsh, you would typically edit your `~/.zshrc` file using the `bindkey` command. This allows you to tailor the terminal experience to your personal preferences and workflow.