Skip to content
Related Articles

Related Articles

alias command in Linux with Examples
  • Last Updated : 19 Feb, 2021

alias command instructs the shell to replace one string with another string while executing the commands.

When we often have to use a single big command multiple times, in those cases, we create something called as alias for that command. Alias is like a shortcut command which will have same functionality as if we are writing the whole command.


alias [-p] [name[=value] ... ]

Creating an alias :


alias name="value"

Creating an Unalias : Removing an existing alias is known as unaliasing.


unalias [alias name]

Options for Alias command:

  • -p option : This option prints all the defined aliases is resuable format.


    alias -p

  • –help option : It displayes help Information.


    alias --help

How to remove an alias?
We use unailas command for this purpose.

How to permanently store aliases across sessions?
We can store aliases in shell configuration files. For example for Bash Shell, we can write in ~/.bashrc.

alias CD="cd Desktop" 

My Personal Notes arrow_drop_up
Recommended Articles
Page :