Stop Typing the Same Commands
If you're still typing cd into deeply nested folders, you're wasting time. Use cd - to go back to the previous directory, and cd ~ to jump home. For frequent destinations, set up aliases in your shell config:
# ~/.bashrc or ~/.zshrc
alias proj="cd ~/work/projects/current"
alias docs="cd ~/Documents && ls"
Aliases aren't just for cd. Shorten everyday commands like git status to gs or docker compose up to dcu. But don't overdo it; too many cryptic aliases become a burden.
Use History Like a Pro
Your shell remembers everything, but most people only use the up arrow. That's slow. Press Ctrl+R to search backward through history. Type a fragment and hit Ctrl+R again to cycle through matches.
For more power, install fzf (fuzzy finder). It gives you an interactive filter for history, files, and more. With fzf, you can bind Ctrl+R to a fuzzy search over your entire command history. It's a game changer.
Navigate Faster with z or autojump
Instead of remembering full paths, use z (or autojump). It learns the directories you visit most and lets you jump with a fuzzy match:
z proj # goes to ~/work/projects/current if that's your most frequent match
Install it once, and you'll never type long cd paths again.
Master Your Editor Shortcuts
If you use Vim or a Vim-mode in your IDE, learn a few essential motions. For example, ci" (change inside quotes) deletes the content inside double quotes and puts you in insert mode. dd deletes a line, yy copies it, and p pastes. These small moves add up over a day.
In a regular terminal, you can also enable Vim mode in Bash or Zsh with set -o vi. This lets you use Esc to enter normal mode and navigate with h, j, k, l, and use b, w, e to move between words. It takes a week to get used to, but then your editing speed doubles.
Run Long Commands in the Background
When a command takes forever, don't block your terminal. Append & to run it in the background, but then you lose the output. Better: use nohup and redirect output to a file:
nohup long-running-task > output.log 2>&1 &
Now you can keep working and check the log later. Or use tmux or screen to keep sessions alive even if you close the terminal. tmux is more modern and allows splitting panes, which is great for running a dev server and a shell side by side.
Use Shell Shortcuts for Editing
Ctrl+A moves to the beginning of the line, Ctrl+E to the end. Alt+F moves forward a word, Alt+B backward. Ctrl+W deletes the previous word. Ctrl+U deletes from the cursor to the beginning. These shortcuts work in Bash and Zsh and save you from holding down the arrow key.
Batch Rename with rename or mmv
Instead of writing a loop, use rename (Perl version) or mmv for bulk renames:
# rename all .txt to .md
rename 's/\.txt$/\.md/' *.txt
# mmv example: move files with pattern
mmv '*.jpeg' '#1.jpg'
These tools are safer than a hand-rolled for loop and handle edge cases better.
Pipe with xargs for Parallelism
xargs can run commands in parallel with -P. For example, to compress all images in a folder with multiple processes:
find . -name "*.png" -print0 | xargs -0 -P 4 -I {} convert {} {}.jpg
Be careful with quoting and spaces; use -0 with find -print0.
Make Your Prompt Minimal
A long prompt with user@host: /full/path wastes horizontal space. Shorten it to just the current directory name or a tiny symbol. In Zsh, you can do:
PROMPT='%1~ %# '
This shows only the last component of the path. You'll gain space and reduce clutter.
Learn One New Tool at a Time
Don't try to install everything at once. Pick one tip, use it for a week until it becomes muscle memory, then add the next. The goal isn't to have a fancy setup; it's to save time every day without thinking.
Start with Ctrl+R and aliases. Those two alone will make you noticeably faster. Then move to z and fzf. Your terminal will feel like an extension of your hands.
Top comments (0)