Friday, November 30, 2012

HOW TO USE “alias” COMMAND IN LINUX



The alias command used to rename Linux operating system commands.

For Example..


[root@www ~]# alias show="ll"

With the help of this command (written above) we can modify our command. In simple words we can rename the linux OS commands with this command. Now we can get results of LL command by writing Show.
[root@www ~]# show

-rw-------. 1 root root 1336 Nov 28 19:45 anaconda-ks.cfg
drwxr-xr-x. 4 root root 4096 Nov 30 16:38 Desktop
drwxr-xr-x. 2 root root 4096 Nov 28 19:55 Documents
drwxr-xr-x. 2 root root 4096 Nov 28 20:21 Downloads
-rw-r--r--. 1 root root 49919 Nov 28 19:45 install.log
-rw-r--r--. 1 root root 10261 Nov 28 19:40 install.log.syslog
drwxr-xr-x. 2 root root 4096 Nov 28 19:55 Music
drwxr-xr-x. 2 root root 4096 Nov 28 19:55 Pictures
drwxr-xr-x. 2 root root 4096 Nov 28 19:55 Videos

[root@www ~]#