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

Get Linux® Desk Reference, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.