If you spend your day inside a terminal, a few smart shell aliases can feel like cheating—because suddenly, they’re faster than any fancy GUI tool you’ve tried. And this is the part most people miss: tiny, two- or three-letter shortcuts can save you hours over weeks and months, especially if you live in Linux.
But here’s where it gets a bit controversial: some people swear by the mouse and GUI apps, while others argue that real productivity comes from the keyboard and the shell. Where do you stand?
Let’s walk through seven practical shell aliases that can seriously speed up your workflow, while staying beginner-friendly and easy to tweak for your own setup.
What aliases actually are
Before diving into examples, it helps to understand what an alias is in shell terms. An alias is simply a shortcut command that you define, which expands into a longer command—or even a chain of commands—behind the scenes. Instead of repeatedly typing a long, complex command, you type a short, memorable word.
Think of an alias like a custom keyboard macro for your terminal. For example, rather than entering a long path every time, you can define a short label that instantly takes you there. This not only speeds you up but also reduces typos and mental overhead.
How to create aliases (temporary and permanent)
Creating a basic alias for the current terminal session is simple. You use the alias keyword, followed by the short name you want and the full command in quotes. For example:
alias dl='cd /home/user/Downloads'
After running this, as long as that terminal session stays open, typing dl will change the directory to your Downloads folder. However, once you close the terminal, that alias disappears.
To keep aliases permanently, you usually add them to a configuration file that your shell reads when it starts. For Bash, that’s commonly the .bashrc file in your home directory. You would add one alias per line, such as:
alias dl='cd /home/user/Downloads'
When you open a new terminal, Bash reads .bashrc, and your aliases are immediately available.
A cleaner way: separating aliases into their own file
Here’s a small quality-of-life trick that more advanced users love, but beginners often don’t discover for a long time. Your .bashrc file tends to accumulate a lot of different settings—environment variables, prompt tweaks, and more. If you only want to back up or share your aliases between machines, copying the entire .bashrc can be overkill and even risky.
A nicer approach is to store aliases in a separate file, such as ~/.bash_aliases. You then “include” that file from your .bashrc using a small conditional block like this:
bash
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
bash
alias update='sudo apt update && sudo apt full-upgrade && sudo flatpak update'
bash
alias update='sudo pacman -Syu && sudo flatpak update'
bash
alias work='cd /home/joaoc/Documents/Projects && code .'
bash
alias pls='sudo $(fc -ln -1)'
bash
alias nas='ssh joaoc@192.168.8.115'
bash
alias netfix="nmcli networking off && sleep 2 && nmcli networking on"
bash```bash
alias netfix="sudo systemctl restart NetworkManager"
alias dps='docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"'