Aliases
You can use the alias command to define a shortcut for a command string. There are two types of aliases: regular alias and tracked alias. A tracked alias shows you the complete path of the command.
You can use the alias command by itself to generate a list of all aliases set up in the current environment. If you use the -t command, as follows, then you will get a list of all tracked aliases:
alias -t
You can use the alias command to define an alias for a command or for a number of commands. In the following example, an alias is set up for the ls command as the ls command but with the -l option:
alias ls="ls -l"
Get Practical UNIX now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.