Linux and Unix alias command
alias instructs the shell to replace one string with another when executing commands. It is used to customize the shell session interface. Using alias, frequently-used commands can be invoked using a different, preferred term; and complex or commonly-used options can be used as the defaults for a given command.
Aliases persist for the current session. They can be loaded at login time by modifying the shell's .rc file. The invocation and usage of alias differs depending on the shell; see your shell's documentation for details.
The examples below are common to many shells, including Unix.
|name||Specifies the alias name.|
|command||Specifies the command the name will be an alias for.|
|-a||Removes all alias definitions from the environment of the current shell session.|
|-t||Sets and lists tracked aliases.|
|-x||Sets or prints exported aliases. An exported alias is defined for scripts invoked by name.|
Invoking alias with no arguments will display all currently aliased commands.
alias ls='ls --color=auto'
Add color coding to the file and directory listings of ls.
alias ll='ls -la'
Create an alias 'll' which will run ls with options to display detailed file information, including files that begin with '.'.
alias ..='cd ..'
alias ...='cd ../../../'
alias ....='cd ../../../../'
alias .....='cd ../../../../'
Create aliases for quickly navigating to one, two, three, or four higher-level directories.
alias port='netstat -tulanp'