O'Reilly logo

Linux® Desk Reference, Second Edition by Scott Hawkins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required