next up previous contents
Next: Scripts Up: Shells Previous: Environment

Aliases

Aliases are a method of providing shorthands for commonly used commands. Before the shell goes off to search the disk for a program, it will search its alias list to see if one of the aliases has been typed in by the user. In bashgif aliases are set with the alias command and unset with the unalias command.

One of the most commonly used aliases is to replace ls by ls -F and rm by rm -i:

$alias rm="rm -i"
$alias ls="ls -F"
$

Typing alias on its own will give a list of current aliases:

$alias
alias ls='ls -F'
alias rm='rm -i'
$

To delete an alias we can use the unalias command:

$unalias ls
$alias
alias rm='rm -i'
$



Mark O. Stitson
Wed Sep 25 10:45:32 BST 1996