Aliases


What is an Alias?

A helpful feature, especially for many new users to UNIX is the alias function. This allows a command, possibly with many options and flags, to be assigned another name. Usually it is a shorter name or one that is easier to remember.

Or if you are like me and can not type, you may want to make common typos of commands into the appropriate aliased command. For example the move command "mv", I have a bad tendency to type "mc". The command "mc" is a text based file browser called the Midnight Commander (which I don't like). So I aliased my common typo "mc" to the command I really wanted "mv".


How Do I Setup and Alias?

Well the exact syntax depends on the shell that you are using. I will discuss how to do it under tcsh and bash. Most other shells syntax is the same or close.

tcsh

Under tcsh the syntax to alias a command is as follows...

alias <aliased name> <original command>

bash

Under bash the syntax to alias a command is slightly different...

alias <aliased name>=<original command>


Daniel J. Hood
Last modified: Thu Jan 9 12:48:45 EST 2003