A list of 30 Bash shortcut keys that will save you time. Bash is the default shell in most Linux distributions and the most popular. The shortcuts are divided into 3 sections (navigation, editing and cutting and pasting) for easy reference.
Tab | Auto-complete files and folder names |
Shift + Page Up | Scroll terminal output up |
Shift + Page Down | Scroll terminal output down |
CTRL + R | Search command line history |
CTRL + L | Clear the screen |
CTRL + F | Move forward one character |
CTRL + B | Move backward one character |
Alt + F | Move forward one word |
Alt + B | Move backward one word |
CTRL + A | Go to the beginning of the line |
CTRL + E | Go to the end of the line |
CTRL + D | Exits the shell (EOF) |
CTRL + Z | Pauses the current process and sends it to the background |
CTRL + S | Stops output to the screen (XOFF) |
CTRL + Q | Turns on output to the screen (XON) |
CTRL + C | Delete the entire line or kill the current process |
CTRL + T | Switch positions of current and previous characters |
Alt + T | Switch positions of current and previous words |
Alt + U | Change the current word (from cursor position to end of word) to uppercase |
Alt + L | Change the current word (from cursor position to end of word) to lowercase |
Alt + C | Change the current character to uppercase |
CTRL + H | Delete the character before the cursor. Similar to pressing backspace |
CTRL + V | Add a special character. e.g. CTRL+V CTRL+C will add ^C instead of canceling the current command |
CTRL + _ | Undo |
Alt + Backspace | Deletes from cursor position back to the first space |