H I O X INDIA
LINUX Commands
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Templates 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)
Español Français 中文 Deutsch
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

LINUX / UNIX cmd
Introduction
Commands in A
Commands in B
Commands in C
Commands in D
Commands in E
Commands in F
Commands in G
Commands in H
Commands in I
Commands in J
Commands in K
Commands in L
Commands in M
Commands in N
Commands in P
Commands in R
Commands in S
Commands in T
Commands in U
Commands in W
Commands in Y
More about Linux
Feedback




alias Linux Commands


Topic

What is Linux alias Command?




Explanation

alias COMMAND:
     alias command allows you to create a shortcut to a command. As the name indicates, you can set alias/shortcut name for the commands/paths which is too longer to remember.

SYNTAX:
  The Syntax is
     alias [options] [ AliasName [ =String ] ]

OPTIONS:
     
-a Removes all alias definitions from the current shell execution environment.
-p Prints the list of aliases in the form alias name=value on standard output.



EXAMPLE:
     
  1. To create a shortcut temporarily:
    alias lhost='cd /var/www/html'

    This command will set lhost to cd /var/www/html/.
    Now if you type lhost it will take you to the specified folder/directory.

  2. To create a shortcut Permanently:
    You can put your aliases into the /home/user/.bashrc file. It is good to add them at the end of the file.
    alias home='cd /var/www/html/hscripts/linux-commands'

    Now if you type home it will take you to the specified folder/directory.

  3. To create a shortcut for a command:
    alias c='clear'

    This command will set c to clear.
    Now if you type c it will clear the screen.






        Find LINUX Commands... Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this LINUX / UNIX cmd reference. This is a copyright content.


privacy policy     license     sitemap
© 2004-2009 HIOX INDIA - hioxindia.com

Other Links