Aliases

Aliases

Aliases are a popular method of customizing your shell environment. The idea behind aliases is to select a couple of keystrokes to stand for a much longer typed sequence. Collections of alias commands are typically stored in a file called .alias in the user's home directory. From there, they can be sourced at shell startup time. The following command is used:

alias la 'ls al'

alias

[name [wordlist]]

Without arguments, displays all aliases. With name, displays the alias for name. With name and wordlist, assigns wordlist as the alias of name.

Example: To create an alias such that the command sequence "ls a" will be run when the user types "la", use

alias la 'ls a'

unaliaspattern

Without arguments, removes all aliases. Removes all aliases whose name matches the pattern.

Example: To remove the alias ls from the alias list, use

unalias la

 



Linux Desk Reference
Linux Desk Reference (2nd Edition)
ISBN: 0130619892
EAN: 2147483647
Year: 2000
Pages: 174
Authors: Scott Hawkins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net