Bash keyboard shortcuts for Linux
36 default Bash shortcuts on Linux, grouped by task.
36 shortcuts
Keys:
Moving the cursor
7 shortcuts| Action | Keys |
|---|---|
| Go to the start of the line | CtrlA |
| Go to the end of the line | CtrlE |
| Back one word | AltB |
| Forward one word | AltF |
| Back one character | CtrlB |
| Forward one character | CtrlF |
| Jump between the start of the line and the cursor | CtrlX,CtrlX |
Cutting and pasting
14 shortcuts| Action | Keys |
|---|---|
| Cut from the cursor to the start of the line | CtrlU |
| Cut from the cursor to the end of the line | CtrlK |
| Cut the word before the cursor | CtrlW |
| Cut the word after the cursor | AltD |
| Paste the last cut text | CtrlY |
| Delete the character before the cursor | CtrlH |
| Delete the character under the cursorLine has text | CtrlD |
| Swap the last two characters | CtrlT |
| Swap the last two words | AltT |
| Uppercase the word | AltU |
| Lowercase the word | AltL |
| Capitalise the word | AltC |
| Undo the last edit | CtrlX,CtrlU |
| Edit the command in your editor | CtrlX,CtrlE |
History
6 shortcuts| Action | Keys |
|---|---|
| Search history backwards | CtrlR |
| Cancel the history searchSearching history | CtrlG |
| Previous command | CtrlPor↑ |
| Next command | CtrlNor↓ |
| Insert the last argument of the previous command | Alt. |
| Run the command and fetch the next from history | CtrlO |
Completion
2 shortcuts| Action | Keys |
|---|---|
| Complete the command or file name | Tab |
| List all completions | Tab,Tab |
Programs and screen
7 shortcuts| Action | Keys |
|---|---|
| Stop the running program | CtrlC |
| Suspend the running program | CtrlZ |
| Quit the program and dump core | Ctrl\ |
| End of input; exits the shell on an empty lineEmpty line | CtrlD |
| Clear the screen | CtrlL |
| Pause output | CtrlS |
| Resume output | CtrlQ |
No shortcuts match. Try fewer words, the key names only, or search every app.
These are the default Bash and Zsh key bindings on Linux, from GNU Project's official list for version Bash 5.2 / Zsh 5.9. Shortcuts that exist only on another system are left out here; the all-systems view shows every binding side by side.
Other systems: Bash shortcuts for Mac, Bash shortcuts for Windows. Or print the Bash cheat sheet.