If you spend more than a few minutes a day in a shell, small habit changes can save real time. These are low-friction, practical techniques that focus on reducing repeated typing, rescuing dropped sessions, and speeding lookups—rather than elaborate dotfiles that are hard to maintain.
- Alias only the commands you use daily to avoid forgetting them.
- Use fzf (Ctrl+R/Ctrl+T) to search history and files quickly.
- Run tmux sessions to survive SSH disconnects and split panes for multitasking.
- Prefer ripgrep (rg) and avoid unnecessary cat | grep pipelines.
- Create small scripts for repeated multi-step workflows and keep them discoverable.
1) Alias the commands you really repeat
Aliases are the simplest productivity wins: map frequent multi-word commands to short tokens so you stop typing the same things dozens of times. Examples that developers commonly use include gst for git status, ga for git add, gc for git commit, dcu for docker-compose up and ll for ls -lah.
A few practical rules of thumb when adding aliases:
- Alias only commands you run multiple times every day; avoid one-off commands so you don’t forget what an alias does.
- Keep aliases memorable and consistent across machines when possible (store them in a shared dotfiles file or include file).
- Document aliases in a short README or comment block in your shell config so future-you (and teammates) can recover them quickly.
2) Use fzf to search history, files and branches interactively
fzf is a fuzzy finder for the terminal that speeds navigation of command history, files and even git branches. After installing it with your package manager, a few small integrations deliver outsized value:
- Bind Ctrl+R to search your command history with a fast interactive filter.
- Bind Ctrl+T to search files (one recommended setting is to use ripgrep to list files, including hidden ones).
- Use it for git branch selection: a short wrapper can let you pick a branch with fzf and then check it out.
Pressed for time? Start by adding just Ctrl+R for history search—being able to recall a prior command with a few keystrokes saves minutes every day.
3) Keep remote work resilient with tmux
tmux is a terminal multiplexer that lets you split panes, maintain named sessions, and reattach after a dropped SSH connection. You don’t need to learn every feature; a minimal set of commands covers most use cases:
- Create a session:
tmux new -s work - Reattach an existing session:
tmux attach -t work - Detach while leaving processes running: use the tmux detach key (default prefix then
d). - Split panes: vertical and horizontal splits let you run multiple tools side-by-side.
For remote development, tmux protects long-running tasks from transient network problems: if your SSH connection drops, the session keeps running and you can reconnect without losing context.
4) Prefer ripgrep (rg) and avoid unnecessary pipes
Simple command hygiene reduces wasted CPU and typing. For example, piping a file into grep (cat file | grep pattern) is avoidable—use grep directly or, better, ripgrep (rg) when available. Ripgrep is faster and has sensible defaults for searching codebases.
If you cannot install rg, at least prefer recursive grep forms (for example grep -r) over cat | grep. Small changes like this make searches noticeably snappier, especially in large projects.
5) Use shell shortcuts and directory jumpers
Learn a handful of built-in shortcuts that save keystrokes:
!!repeats the previous command (handy when you forgot to add sudo).!$expands to the last argument of the previous command.cd -returns to the previous directory.
For more powerful navigation, consider tools like z or autojump which jump to frequently used directories by partial names; for example, typing z proj can take you to a matching project folder without long path typing.
6) Make tiny scripts for repeated sequences
When you run the same sequence of commands together, a short shell script turns multi-step routines into one reliable command. A typical pattern is a script that prepares a development environment: source environment variables, install dependencies, bring containers up and start the dev server. Make the script executable (chmod +x) and run it directly instead of repeating manual steps.
Rules for useful scripts:
- Keep them focused and readable—each script should do one higher-level task.
- Store project-specific scripts in a scripts/ or bin/ directory tracked with the project so they’re discoverable by teammates.
- Fail fast and print helpful messages so you know why a step didn’t complete.
7) Learn a minimal editor skillset
Knowing how to open and edit files quickly at the terminal reduces context switching. Pick an editor that exists on most systems (vim or nano are common) and learn a small set of commands that cover frequent actions. For vim users, a handful of motions and edit commands (for example delete-line, yank and paste) will handle the majority of quick edits you need to make on remote systems.
8) Improve observability of your context
A compact prompt that shows your current directory and, when applicable, the git branch reduces the need to run extra commands. Implement a prompt that prints only what you need most; avoid overloading it with information that increases noise. If you use git frequently, a branch indicator is often the most useful addition.
9) Recover history without scrolling
Rather than scrolling, use the history command piped into grep or rely on Ctrl+R (especially effective if combined with fzf) to find previously executed commands. This reduces repetitive typing and helpfully surfaces older commands you might otherwise retype from memory.
How to adopt these habits without overwhelm
- Pick two improvements to try for a week—typical recommendations are aliases plus Ctrl+R history search.
- Make a short checklist and add any new aliases or scripts to a single place so you can port them to other machines later.
- Avoid feature creep: prefer small, dependable shortcuts that remove decision friction rather than large, fragile customizations.
Practical checklist (first 30 days)
- Week 1: Create 3–5 aliases for daily commands; add Ctrl+R history search.
- Week 2: Install fzf and bind Ctrl+T for file search; add one small project script.
- Week 3: Start using tmux for remote sessions; learn detach/attach workflow.
- Week 4: Replace grep workflows with rg where available; add a compact git-aware prompt.
Unresolved choices and trade-offs
There is no single correct shell setup. The source guidance emphasizes low-friction changes over elaborate dotfile configurations. If you value portability, prefer minimal aliases and scripts that use POSIX-compatible syntax; if you rely on fast interactive search, fzf combined with rg is a powerful pairing. The right mix depends on what you type daily and whether you work locally or on remote servers.
Key takeaways
- Alias only the commands you run every day to avoid cognitive overhead.
- fzf and Ctrl+R dramatically reduce time spent recalling commands and files.
- tmux keeps remote work resilient; a few tmux commands are enough to start.
- Prefer rg over grep and avoid unnecessary cat pipes.
- Script repeated multi-step tasks and keep scripts discoverable and focused.
Start small: two or three of these changes adopted consistently will compound into saved minutes every day—what the source calls turning the terminal from a chore into a productivity superpower.
