4 Ways to use the Linux alias Command
Consider the following command that prints the top ten directories that take up the most disk space:
# du -h /path/to/directory | sort -hr | head -n 10
This is a frequent check, and you can imagine the effort required to type this command in the terminal and scripts. Repetitively typing or copying the same command lowers productivity and introduces a hassle you can easily avoid with the alias command.
By making aliases for the commands you use frequently, you can save yourself a couple of hours every month. Similar to personalized shortcuts, aliases refer to a command (or group of commands) that can be used with or without personalized parameters.
You are likely utilizing aliases on your Linux system without being aware of the fact.
This article will introduce you to the alias command. We’ll show you how to create command aliases with the Linux alias command. Next, we’ll go into the details of making command aliases permanent on your system. Finally, we’ll show you how to remove command aliases.
But first, let’s start with a short introduction to the idea of command aliases in Linux.
[mai mult...]