7 Tricks To Tame Your Terminal
Given how much we use the terminal, any friction to get an action done is multiplied hundred of times resulting in a lot of wasted time. Optimizing the way we use the terminal will give us a decent productivity boost. In this post I share with you some common pain points that I faced before and found solutions for.
1. My terminal theme and colors are confusing!
Solution: Oh My Zsh.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- Pick a theme in
~/.zshrc
(for oh-my-zsh, setZSH_THEME="agnoster"
or similar). - Open a new terminal to see your fancy prompt.
.. or pick a dedicated color scheme like Solarized, Gruvbox, or Dracula.
2. I keep hunting for my terminal window!
Solution: Find a shortcut to hover a terminal whenever you need it.
For MacOS:
- Install iTerm2 if you haven’t already.
- Enable hotkey window:
- In iTerm2 > Preferences > Keys, set up a “Hotkey” (e.g.
⌘ +
`). - Turn on the “Hotkey Window” option.
- Now press your hotkey, and a terminal drops down instantly—press it again to hide.
- In iTerm2 > Preferences > Keys, set up a “Hotkey” (e.g.
For Linux, use a drop-down terminal like Guake, Yakuake, or Tilda:
- Install e.g.
sudo apt-get install guake
(Ubuntu) orsudo dnf install guake
(Fedora). - Launch Guake, then press F12 (default) to summon or hide it.
- Customize the hotkey in Guake’s preferences if you want a different shortcut.
3. It’s slow to navigate directories!
Solution: z
Use z
(autojump-like) or zoxide
:
- Install
z
:brew install z
(Mac) orsudo apt-get install z
.- For
zoxide
, visit: zoxide.org.
- For
- Source it in your shell config (
.zshrc
,.bashrc
), e.g.eval "$(zoxide init bash)"
. - After a day or two of normal usage, type
z <partial-dir-name>
to jump instantly.
4. I find myself writing the same commands lots of times!
Solution: zsh-autosuggestions or quickly search the history.
For zsh-autosuggestions
:
brew install zsh-autosuggestions
(Mac) or use your distro’s package manager.- Add
plugins=(zsh-autosuggestions)
in your~/.zshrc
(if using oh-my-zsh). - Watch as your previous commands appear in lighter text—press right arrow to accept.
5. I Don’t Know the Right Command!
Solution: use a LLM CLI tool to ask it for commands.
- Install llm via pip.
- Either install a free LLM locally or provide API keys (i.e.,
llm keys set openai
) - Check the available LLMs you have via
llm models
- Add this to your
~/.bashrc
:alias please="llm -m gpt-4o 'Give me a short macOS terminal command to'"
- Then just run
please "How do I find all .txt files and remove them?"
6. I’ve got five tasks at once, but each new shell is a hassle
Solution: persist sessions with tmux and learn shortcuts for pane/window management.
For MacOS:
- Use iTerm2 with split panes or multiple tabs:
- Press
⌘ + T
for new tab, or⌘ + D
/⌘ + Shift + D
to split panes. - Keep tasks running in separate tabs/panes.
- Press
- Try tmux if you like multiplexing within one terminal:
brew install tmux
- Run
tmux
, open new windows/panes withCtrl+B c
(new window) orCtrl+B %
(vertical split).
7. The cursor is slow!
Solution: adjust the cursor speed and learn shortcuts to jump around text quickly.
For MacOS:
- Increase keyboard speed in System Settings > Keyboard. Slide “Key Repeat” to Fast, “Delay Until Repeat” to Short.
- Set up Option + ← / → to move by word in Terminal:
- In iTerm2, under Preferences > Profiles > Keys, map Option+Left to
Esc+b
(move back one word) and Option+Right toEsc+f
(move forward one word).
- In iTerm2, under Preferences > Profiles > Keys, map Option+Left to
For Linux:
- Adjust keyboard repeat rate: e.g.
xset r rate 200 50
(200 ms delay, 50 repeats/sec) in your.bashrc
or.profile
if you want it permanent. - Terminal shortcuts often already exist: Try
Ctrl+Left
orAlt+Left
to jump word-by-word. If needed, add them in your Terminal Preferences or use your.inputrc
.
Little tweaks can remove loads of friction and drastically boost your terminal productivity. We can (and should) find similar tricks around the software we use most: Browser, IDE, OS, etc.