Shell Aliases
When working on Linux and Unix systems, you’ll often find yourself using long shell commands that you repeat several times per day (or per session). Things like
- checking on the current resource usage of a system,
- checking if a process has completed yet, or
- using a complex group of commands, piped together with special options to give you just the output you want.
Generally, you’ll either use CTRL+R to search for these past commands in the shell’s history. Some of you may even copy useful commands to a special file that you can easily reference. You might even just enter them manually each time you need them, since you’re too lazy to be bothered.
There’s a simple solution that covers all of these cases well: Aliases.