Breadcrumbs 
Learning >> Documentation >> Configuring the Shell >> Command aliases
 
Recent News
We're No 1!
We've reached the top! (Of Google!)
[ more ]
Firefox 3 Download Day
Firefox 3 has been officially released and is looking to set a world record for the most downloaded piece of software in 24hrs.
[ more ]
SSL Renewed
SSL cert has been renewed by the admin team.
[ more ]
Command Aliases
Command Aliases

Aliases are commands that you make yourself, made up of other simpler commands. Although it's hard to describe, an example should make things clear.

'ls' on its own just lists files. It doesn't list the permissions on the file, and its output format is not terribly easy to read. I much prefer the output of 'ls -l'. So, in my .bashrc there is a line:

alias ls='ls -l'

So whenever I type 'ls' at the shell, bash understands it to mean 'ls -l' and executes that.

Another handy alias in my .bashrc is this:

alias listscp='ps aux | grep scp'

This searches through all the processes on the machine for 'scp' [a utility to transfer files]. Although there is no command listscp, if I type that at the shell, bash understands it to mean what is in the quotes above, and executes that. Now lets see how to change and add to your PATH.