->Title Page
->Intro
->Unix
-->Overview
-->File Structure
-->Online Manual
-->Basic Commands
-->Additional Commands
->alias
--->ap
--->biff
--->chmod
--->compress/uncompress
--->df
--->diff
--->du
--->echo
--->find
--->finger
--->ftp
--->grep
--->history
--->kill
--->look
--->mail
--->ps
--->script
--->setenv
--->source
--->spell
--->tar
--->telnet
--->umask
--->who
--->Miscellaneous
-->Login files
-->Special characters
-->Miscellaneous Tips
-->Things to try
->Vi editor
->Mirror sites
->Further reading

[ Up ]
[Prev][Home][Next]
[Author]

Unix ---> alias

The alias command allows you to define shortcuts to save yourself time. In a sense, alias creates a link between a requested set of keystrokes and another set of keystrokes. For example, to use the rm command in interactive mode I would type


    rm -i
By typing


    alias rm 'rm -i'
the alias command would allow me to avoid typing the interactive flag, -i, every time a called the rm command.

The alias command defines a link between the first and the second arguments following the command. Whenever the first argument is entered at the command prompt, the Unix shell substitutes it with the second argument. An alias link stays in effect until the Unix session is ended or the link is "unaliased". To remove the link in my previous example, I would type unalias x. The power of this command is more easily realized when used in a Login file.

Actually, alias is not a command. It is part of the particular shell I was familar with when I wrote this manual (csh). You can think of it as a command, but if doesn't work, you are probably using a different shell.

Please notify owners of webpages with outdated links to these pages

Find this site useful? Want to give something back?

© 1993-2001 Christopher C. Taylor