alias - create names or abbreviations for commands
ExamplesAlias can be used to correct your typos on shell command line. For example, the most common typo is typing
ls. The following
aliascommand will make
$ alias sl=ls
Another useful way on how to use
aliascommand is the ability to create a new customized commands for most used commands chains. For example:
$ alias estcon="netstat -ant | grep ESTABLISHED"
yet, another example of
alias command usage
$ alias ls="ls --file-type"
unalias your already alias defined commands use
$ unalias ls
Please note, that all alias definitions are temporary and accessible within a current terminal session only. To make an alias permanent, you need to edit your
~/.bashrc file. For example to create a new permanent alias for
ls command insert a following line into your
alias ls="ls --file-type"