How to create alias command in linux

linux alias command

1. Name

alias – create names or abbreviations for commands

2. Examples

Alias can be used to correct our typos on shell command line. For example we can create sl command to simulate ls command:
$ alias sl=ls






$ alias estcon=”netstat -ant | grep ESTABLISHED”
create new customized bash commands with alias
Alias can also be used for abbreviations:
$ alias ls=”ls –file-type”
create abbreviations to bash commands with alias
NOTE: to unalias your commands use unalias command.
$ unalias ls
However, creation of aliases with alias command is temporary just for current terminal session. To make alias permanent you need to consult ~/.bashrc file. To make changes pernament edit your ~/.bashrc file and add line similar to this:
alias ls=”ls –file-type