How to add command alias in linux


Alias is a common way to add user specific customization to any linux command.
to view list of alias on your system,
To add alias
With command above we have set alias for df command, so if we run df on tty/console we will actually get the output of “df –kh”
Output of df before we setup alias.
Output of df after we setup alias.
To remove the alias use,
Note:
1. To set the alias permanently add it in ~/.bashrc which will be specific to user.
2. To set the alias permanently add it in /etc/.bashrc which will be applicable to all users on the host.

Comments

  1. You have presented the description in a very simple method.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to find execution time of any command or script

scp data from server behind proxy / firewall / dmz