Linux Shortcuts
To become efficient at the command line, you need to learn how to move around quickly without having to type every single character.
1. Tab Completion (The Most Important!)
The Tab key is your best friend. When you start typing a command, filename, or directory, press Tab to have Linux finish the name for you.
- If there is only one match, it will complete automatically.
- If there are multiple matches, press Tab twice to see all possibilities.
2. Command History
You don't need to re-type long commands. Use the Up Arrow and Down Arrow keys to scroll through your previous commands.
3. Essential Control Shortcuts
Master these common combinations to speed up your work:
- Ctrl + C: Stop (Interrupt) a running command that is taking too long or is stuck.
- Ctrl + L: Quickly clear the screen (same as typing clear).
- Ctrl + A: Jump the cursor to the beginning of the current line.
- Ctrl + E: Jump the cursor to the end of the current line.
- Ctrl + U: Delete everything from the cursor back to the start of the line.
4. Swapping Characters
Ever made a typo like sl instead of ls?
- Ctrl + T: Swap the current character under the cursor with the one before it.
Tip: Practice using Tab completion every single time you type a path or filename. It prevents typos and makes you significantly faster!