7 Useful Bash Aliases for Faster Linux Command Line Work
In this article, learn how to add 7 useful Bash aliases to '~/.bash_aliases' on Linux to update packages, check ports, follow logs, find processes, and save time at the command line.
β Ravi Saive
If you find yourself typing the same long Linux commands every day, Bash aliases can save you time.
Hereβs how to create a ~/.bash_aliases file with seven useful alias setups for navigation, ls, package updates, ss, ps, journalctl, cp, and mv.
When you manage Linux servers regularly, commands such as sudo journalctl -fu nginx or sudo ss -tulpn can become part of your daily routine.
Typing them once is not a problem, but repeating long commands throughout the day takes extra time and also increases the chance of making a typo when you are working quickly.
A Bash alias gives a long command a shorter name that is easier to remember and type. For example, instead of entering sudo ss -tulpn, you can create an alias called ports and simply type ports whenever you need the same command.
Since aliases are built into Bash, you don't need to install anything extra, and you can use them on any modern Linux distribution.