Creating aliases in bash

Sat, May 23, 2009

Linux

Are you tired off typing out full commands? if so aliases can save you time. They allow you to shorten long commands down into one word. To add a alias edit ~/.bashrc

nano ~/.bashrc

Then come to the bottom of that file and add your aliases like this:

alias rm = "rm -i"
alias lightyrestart = "/etc/init.d/lighttpd restart"
alias server_name="ssh -v -l USERNAME IP ADDRESS"

Then Reload your .bashrc file and your aliases should be enabled

source ~/.bashrc
, , , , , , ,

This post was written by:

- who has written 47 posts on Tuts4Tech.

I am the owner of this website, please feel free to ask me any questions you have

Contact the author

Leave a Reply