Showing posts with label aliases. Show all posts
Showing posts with label aliases. Show all posts

Sunday, June 10, 2012

Create command shortcut (Alias) in Ubuntu

There are many commands that we use very frequently. Some of these commands are lengthy so it takes time to write these commands again and again. In ubuntu we can create shortcut for these commands which is called alias .To create aliases in ubuntu follow these steps:

1. Create a text file in your home directory

  • gedit ~/.bash_aliases "

2. Now  to add alias follow this syntax and put this into .bash_aliases file:
  • " alias Short_command='Original_long_command' "
Example :    alias update='sudo apt-get update'

These are the few tips related to alias
  1. To check current aliases list: alias
  2. To check an existing alias: alias ALIAS_NAME
  3. To remove an existing alias: unalias ALIAS_NAME
Enjoy !!!