feed-image  ISSN 1836-5930



Receive Your Complimentary Guide to Linux NOW!


A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)




Poll

Do you care about your privacy when using a FACEBOOK?
 

linuxconfig.org
is hosted by:



Partner Linux Sites
TuxMachines
DebianAdmin
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
FreeSoftwareLinux
All For Linux

alias
Article Index
1. Name
2. Examples

1. Name

alias - create names or abbreviations for commands

2. Examples

Alias can be used to correct our typos on shell command line. For example we can create sl command to simulate ls command:

$ alias sl=ls 

correct typos on bash command line with alias
Another way how to use alias is to create new customized commands:

$ alias estcon="netstat -ant | grep ESTABLISHED" 

create new customized bash commands with alias
Alias can also be used for abbreviations:

$ alias ls="ls --file-type" 

create abbreviations to bash commands with alias
NOTE: to unalias your commands use unalias command.

$ unalias ls 

However, creation of aliases with alias command is temporary just for current terminal session. To make alias permanent you need to consult ~/.bashrc file. To make changes pernament edit your ~/.bashrc file and add line similar to this:

alias ls="ls --file-type"