Monday, January 4, 2010

Command Aliases in Terminal

All most all unix/linux shells support a feature called aliasing. Using this feature you can shorten a complicated command with several options to a handy one.

For example open a terminal and type in the following.

$ alias l='ls -l'
 Now typing l at the $ prompt will execute the  command ls -l .

Similarly you can alias any command.

If you want the alias to persist across reboots, add them to .bashrc

No comments: