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 !!!

2 comments:

  1. kya blog banaya h
    vry infomative ,vry nice...keep gng ..:)

    ReplyDelete
  2. Data protection has always been a big issue, as the techno world is advancing day by day, people use to save a lot of their important and personal data on their PC, and therefore it becomes extremely necessary for them to take some security measures to protect their data.

    ReplyDelete