COLLEGE OF ARTS AND SCIENCES Department of Mathematics and Statistics


How to use the Alias Command

Create an alias

Aliases allow you to use a command in place of another command or series of commands. To creat an alias, type:

alias (you give a name here) (enter the actual command)
example: alias dir 'ls -la'

This example will execute "ls -la" whenever you type dir. If the actual command contains any spaces, it must be surrounded by single quotes.

Common aliases include:

alias ll 'ls -l'
alias la 'ls -a'

Aliases that are typed at the unix prompt will last for the current login session. If you want to have aliases automatically set up when you log in, you will want to put your alias commands at the bottom of your .cshrc file.

To cancel an alias, type:

unalias (the name you gave it)
example: unalias dir

List aliases

To see a list of all the aliases you have created, simply type: