
September 12, 2026
12 min read
By Kokil Thapa | Last reviewed: September 2026
You open a terminal dozens of times a day to deploy Laravel apps, tail logs, run migrations, and SSH into Ubuntu boxes. Small friction adds up fast. The goal of this guide is to speed up your terminal workflow with shell habits, tools, and configs that survive production pressure. I use these patterns daily on Linux system administration work and client deployments across Nepal and remote teams. Nothing here requires exotic hardware—just a shell, a few packages, and fifteen minutes of setup.
~/.bashrc or ~/.zshrc. These cuts repeat typing, context switching, and SSH reconnect pain on daily dev and deploy tasks.How can you speed up your terminal workflow on Linux?
Start with the shell you already have. On Ubuntu 22.04 and 24.04 servers I maintain, bash remains the default. That is fine. Productivity comes from history search, directory jumping, and repeatable command blocks—not from switching shells on every box.
Install a small toolkit first. These packages appear on nearly every machine I configure for web development in Nepal client projects:
sudo apt update
sudo apt install -y git curl wget jq ripgrep fd-find fzf tmux bat htop
On Ubuntu, fd is often installed as fdfind. Add a symlink or alias so scripts stay portable:
alias fd='fdfind'
Enable programmable completion and a larger history in your shell rc file. Bash example:
# ~/.bashrc — baseline productivity block
shopt -s histappend
export HISTSIZE=10000
export HISTFILESIZE=20000
export HISTCONTROL=ignoreboth:erasedups
bind 'set show-all-if-ambiguous on'
bind 'TAB:menu-complete'
History deduplication matters when you run the same php artisan migrate --force or dep deploy production fifty times during a release week. You want Up-arrow to surface the last unique command, not five copies.
Pick one improvement per day. Alias your top three commands Monday. Add fzf Tuesday. Configure tmux Wednesday. A big-bang rewrite of dotfiles breaks muscle memory and gets abandoned.
Keyboard-first navigation
Learn these bash shortcuts once. They pay back on every long command line:
- Ctrl+A — jump to line start (replace Home on SSH sessions).
- Ctrl+E — jump to line end.
- Ctrl+W — delete word backward.
- Alt+. — insert last argument of previous command (great after
cd). - Ctrl+R — reverse history search; pair with fzf for better results.
On a production Laravel 12 or 13 app, I often chain: find log line, rerun artisan command, tail again. These shortcuts keep your hands on the keyboard instead of fighting terminal paste quirks.
What shell customizations save the most time?
Aliases are the fastest win. They turn repetitive paths and flags into two-letter habits. Keep them honest—alias the commands you type daily, not every command you have ever seen on a blog post.
Example block for PHP and Laravel work on PHP 8.3+ or 8.5:
# ~/.bashrc — Laravel and PHP shortcuts
alias art='php artisan'
alias migrate='php artisan migrate --force'
alias tinker='php artisan tinker'
alias pint='./vendor/bin/pint'
alias pest='./vendor/bin/pest'
alias sail='./vendor/bin/sail'
# Composer 2.10
alias ci='composer install --no-dev --optimize-autoloader'
alias cu='composer update'
Functions beat aliases when you need arguments. This deploy helper wraps Deployer 7 the way I run it on sister sites sharing GitLab CI pipelines:
depprod() {
git status --short
read -r -p "Deploy branch $(git branch --show-current) to production? [y/N] " ans
[[ "$ans" =~ ^[Yy]$ ]] || return 1
dep deploy production -vvv
}
Git shortcuts belong in the same file or in a dedicated ~/.gitconfig include:
# ~/.gitconfig
[alias]
st = status -sb
co = checkout
br = branch -vv
lg = log --oneline --graph --decorate -20
last = log -1 HEAD --stat
unstage = reset HEAD --
For JSON API debugging, pipe to jq instead of squinting at one line. Our JSON formatter tool helps in the browser, but in the terminal jq is instant:
curl -s https://api.example.com/v1/health | jq .
Prompt and directory context
A minimal prompt reduces noise. I keep hostname and path visible on remote servers so I never run a destructive command on the wrong box:
export PS1='\[\033[1;34m\]\u@\h\[\033[0m\]:\[\033[1;32m\]\w\[\033[0m\]\$ '
Directory jumping with z (via zoxide) or a simple bookmark function saves path typing on deep monorepos:
# bookmark: bm laravel /var/www/myapp/current
bm() { export "DIR_$1"="$2"; }
go() { cd "${DIR_$1}"; }
Pair bookmarks with project detection. When I land in a Laravel root, I want art and pest available without thinking. A small conditional in bashrc works:
if [[ -f artisan ]]; then
alias art='php artisan'
fi
Which fuzzy finder and search tools belong in your daily workflow?
fzf turns tab completion and history into a searchable menu. After install, enable key bindings:
# ~/.bashrc
eval "$(fzf --bash)"
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
export FZF_CTRL_T_OPTS='--preview "bat --color=always {} 2>/dev/null | head -200"'
Common bindings once fzf is active:
- Ctrl+T — fuzzy file picker in current tree.
- Alt+C — fuzzy directory jump.
- Ctrl+R — fuzzy history (overrides default reverse search).
ripgrep (rg) replaces slow recursive greps. It respects .gitignore, which matters on Laravel and WordPress 7.1 codebases with vendor and node noise:
rg "RateLimiter" app/ routes/ --type php
rg -l "TODO" --glob '!vendor/*'
For quick regex checks before you commit validation rules, the browser regex tester is handy. In the shell, test with grep -E or a one-line PHP:
php -r "var_dump(preg_match('/^[a-z0-9_-]+$/', 'court-marriage-2026'));"
bat gives syntax-highlighted file previews. Pipe diffs through it during code review from the terminal:
git diff --staged | bat --language=diff
How does tmux help you speed up your terminal workflow on remote servers?
SSH sessions drop. Laptop sleep kills long imports. tmux keeps processes alive and lets you split one connection into multiple panes. I wrote a deeper walkthrough in tmux terminal multiplexing for engineers; here is the practical minimum.
Install and start a named session:
tmux new -As deploy
Essential tmux config (~/.tmux.conf):
set -g mouse on
set -g history-limit 50000
setw -g mode-keys vi
bind | split-window -h
bind - split-window -v
bind r source-file ~/.tmux.conf \; display "Reloaded"
Prefix key is Ctrl+B by default. After prefix: % vertical split, " horizontal split, arrow keys to move, d detach.
On Deployer releases for sites like Notary Kathmandu, I keep one pane on dep deploy, one tailing storage/logs/laravel.log, one watching queue workers. Reconnect with:
ssh production-host -t 'tmux attach -t deploy'
Compare multiplexer options before you standardize a team:
| Tool | Best for | Learning curve | Server default |
|---|---|---|---|
| tmux | SSH persistence, pane layouts, team docs | Medium | Install on Ubuntu; widely documented |
| GNU screen | Legacy servers, minimal installs | Low | Often preinstalled on older hosts |
| zellij | Modern UI, layout presets | Low–medium | Manual install; less common on prod |
For production Ubuntu servers I still pick tmux. The tmux wiki and decade of Stack Overflow answers beat novelty when you are fixing a site at midnight.
How do SSH config and Git workflows reduce context switching?
Typing full SSH commands with usernames and ports wastes time. Centralize hosts in ~/.ssh/config:
Host notary-prod
HostName 203.0.113.10
User deploy
IdentityFile ~/.ssh/id_ed25519
ForwardAgent no
ServerAliveInterval 60
Host staging-laravel
HostName staging.example.com
User ubuntu
LocalForward 3307 127.0.0.1:3306
Connect with ssh notary-prod. Document each host block in your internal runbook so the next developer is not guessing.
Git workflow shortcuts pair well with feature branch deployment workflow articles. A small function creates dated branches consistently:
newbranch() {
git checkout main && git pull --ff-only
git checkout -b "feature/${1}-$(date +%Y%m%d)"
}
For API projects I deliver through API development services, I keep a test-api function that loads base URL and token from .env via grep and fires curl with jq output. Never commit tokens—read them at runtime from local env only.
Parallelize safe read-only tasks with GNU parallel when you audit many sites:
parallel -j4 curl -s -o /dev/null -w "%{http_code} %{url_effective}\n" ::: \
https://site1.example.com \
https://site2.example.com
That pattern shows up during support and maintenance rounds across multiple client properties.
CI and local build speed from the terminal
Terminal workflow is not only SSH. Local speed affects how fast you push fixes. Cache Composer and npm artifacts intentionally. See build caching to speed up CI builds for pipeline detail; locally, use:
export COMPOSER_CACHE_DIR="$HOME/.cache/composer"
npm config set cache "$HOME/.cache/npm"
On Laravel apps, run php artisan config:cache and route:cache in staging before you mirror production. Redis 8.10 caching strategies from Redis caching for Laravel apply after deploy—not something you want to discover manually each release.
What daily habits keep your terminal workflow fast long term?
Dotfiles need version control. Track ~/.bashrc, ~/.tmux.conf, and ~/.ssh/config in a private repo or chezmoi-style manager. When you rebuild a laptop after Dashain travel, you clone configs before you clone client code.
Review aliases quarterly. Delete ones you have not used in ninety days. Bloated rc files slow shell startup and hide the commands you actually need.
Learn the essentials from essential Ubuntu terminal commands first. Advanced tools sit on that foundation. If you cannot navigate permissions and logs comfortably, fzf will not save you.
Security stays non-negotiable. Never paste curl-to-bash snippets you have not read. Use the password generator for service accounts, then store secrets in a proper vault—not in shell history. Set HISTIGNORE for patterns that might capture tokens:
export HISTIGNORE='*TOKEN*:*SECRET*:*PASSWORD*'
When terminal work connects to page performance—running Lighthouse CLI, wrk, or cache flushes—tie it to broader goals in speed optimization and how website speed impacts SEO in Nepal. The terminal is where you verify that the optimisations actually landed.
On booking platforms like Adventure Third Pole Trek, I keep repeatable scripts for clearing config cache, restarting queues, and checking Livewire endpoints. Script names live in a bin/ folder on PATH. That beats remembering five artisan flags during a client call.
Read about my background and customer reviews if you want context on how these workflows show up in delivered projects. For broader reading, browse the blog or return to the homepage.
Key Takeaways
- Install fzf, ripgrep, fd, bat, jq, and tmux once—then build aliases and functions around your real daily commands.
- Use tmux named sessions on every production SSH host so deploys and log tails survive disconnects.
- Keep Git and Deployer shortcuts in version-controlled dotfiles; delete unused aliases every quarter.
- Centralize SSH in
~/.ssh/configand never store secrets in shell history. - Pair terminal speed with CI caching and post-deploy health checks for end-to-end release confidence.
- Add one workflow improvement per day instead of rewriting your entire shell setup overnight.
People Also Ask
Is zsh better than bash for developer productivity?
zsh offers strong completion and plugin ecosystems like Oh My Zsh. bash is default on most Ubuntu servers and macOS still ships it. For team consistency, learn bash well first, then use zsh locally if you prefer. Production scripts should stay POSIX-friendly bash unless your fleet standardizes zsh.
How do I make Ctrl+R history search faster?
Install fzf and run eval "$(fzf --bash)" in your rc file. fzf replaces default reverse search with a fuzzy menu filtered as you type. Increase HISTSIZE and enable histappend so sessions share history and matches are meaningful.
What is the best tmux prefix for daily use?
Default Ctrl+B works everywhere tutorials expect. Some developers remap prefix to Ctrl+A because it sits closer on the keyboard. Pick one binding, document it in your team notes, and keep it identical on local and remote configs to avoid muscle-memory bugs during incidents.
Can terminal workflow improvements help Laravel deployments?
Yes. Aliases for artisan, tmux layouts for deploy plus logs, and Git shortcuts for release branches cut minutes off every push. Combined with Deployer 7 and GitLab CI, a tuned terminal reduces manual steps and makes rollbacks a single remembered command.
Ship faster from the command line
You do not need a dozen new apps to speed up your terminal workflow. You need a reliable shell config, fuzzy search, persistent tmux sessions, and Git habits that match how you actually deploy. Start with three aliases you type every day, one tmux layout for production, and an SSH config block for your busiest server. The compound effect shows up within a week.
If you want help standardizing deploy scripts, server access, or Laravel release pipelines on Ubuntu, contact us or explore custom software development and portfolio examples of production systems built with these workflows.
Frequently Asked Questions
0 Comments
Leave a comment
Your email is not published. Comments appear once they have been read. Sign in to have your details filled in.

