Contents[Hide]

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 

correct typos on bash command line with alias
Another way how to use alias is to create new customized commands:

$ 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" 

Free Linux eBooks

Linux Technical Writer

LinuxCareer, Casual, Volunteer, Home Based

Do you wish to join Linuxcareer.com project and find out how to be a technical writer? We are now looking for volunteers to help us write tutorials and share them with Linux community

  • Casual work from home
  • 10 articles / year

Any active Linuxcareer.com’s author will be entitled to following benefits:

  • actively participate in Linuxcareer.com’s decision making process
  • feedback and help

APPLY

Do you have the right skills?

Our IT Skills Watch page reflects an up to date IT skills demand leaning towards the Linux and Unix environment. We have considered a number of skills and operating systems.

See the result...

Linux Online Training

Learn to run Linux servers and prepare for LPI certification with Linux Academy. 104 available video lessons with PDF course notes with your own server!

Go to top