Terminal Shortcuts Every Dev Should Know
Stop clicking. Start flying.
⌨️ Essential Shortcuts
ctrl + rReverse search through your command history. Start typing and matching commands appear. Saves hours of pressing up-arrow.
ctrl + wDelete the word before the cursor. Faster than holding backspace.
ctrl + uClear the entire line before the cursor. Useful when you mess up a long command.
ctrl + a / ctrl + eJump to the beginning (A) or end (E) of the line. Stops you from holding arrow keys.
!!Re-run the last command. Great for: `sudo !!` when you forget to sudo.
!$Reuse the last argument of the previous command. `mkdir new-project && cd !$`
🛠️ Power Commands
grep -rSearch recursively in files. `grep -ri 'function' src/` — case-insensitive search across all files.
findFind files by name. `find . -name '*.tsx'` — list all TSX files in current directory.
sedFind and replace across files. `sed -i 's/old/new/g' file.txt` — replace all occurrences.
curlMake HTTP requests from the terminal. `curl -I https://example.com` — check response headers.
history | grepSearch your command history. `history | grep docker` — find that docker command you ran yesterday.
ps aux | grepFind running processes. `ps aux | grep node` — check if your Node server is still running.
One-Liner Tricks
find . -type f -name "*.log" -exec rm \;
Delete all .log files in the current directory tree.
tar -czf archive.tar.gz folder/
Compress a folder into a .tar.gz archive.
alias gs="git status"
Create a permanent shortcut. Add to your ~/.bashrc or ~/.zshrc.
The One Tool Worth Installing
Install fzf (fuzzy finder). Press ctrl+r and start typing — it searches your entire command history with fuzzy matching. Life changing.