Display All Command Aliases


alias

If you use a command all the time, or if a command is just particularly long and onerous to type, it behooves you to make that command an alias. After you've created an alias, you type its name, and the command referenced by the alias runs. Of course, if a command is particularly complicated or involves several lines, you should instead turn it into a script or function. But for small things, aliases are perfect.

Aliases are stored in a file in your home directory. You might find them in .bashrc, but more likely (or more properly, rather) they're in .bash_aliases. Most Linux distributions come with several aliases already defined for you; to see that list, just enter alias on the command line.

$ alias alias la= 'ls -a' alias ll= 'ls -l' 


Most distributions purposely keep the default aliases to a minimum. It's up to you to add new ones, as you'll shortly see.



Linux Phrasebook
Linux Phrasebook
ISBN: 0672328380
EAN: 2147483647
Year: 2007
Pages: 288

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