Bashrc Alias

Using linux as a full time operating system has its own up side. I am now learning the basics of using the terminal as opposed to gui for everything. The latest thing I have learnt is to create alias for commands in terminal.

Say there is this folder hidden behind a hierarchy of folders. You access it quite often. Wouldn’t it be simple to have a simple customised command to directly jump to this folder rather than having to type the complete location everytime. Well, the alias does it.

To set an alias all you have to do is open the ~/.bashrc file. Goto the end of the file and you’ll find a section for alias. Just add a line like

alias la=”ls /etc/apt/”

That’s it and you are done. Now whenever you enter the command la in the terminal, it will list all the files of /etc/apt/.

This is a lame example, but you get the idea, don’t you.

Popularity: 1% [?]

Related posts:

  1. Amarok 2.1 : Managing Collections in Mounted Partition
  2. Backup : Ubuntu Intrepid
  3. Am Lovin' vi