Difference between revisions of "Alias"

From Linuxintro
imported>ThorstenStaerk
(Created page with "An alias is a string that stands for a command. For example you can define "greet" to be an alias for "echo 'hello world'" like this: # alias greet="echo 'hello world'" # greet...")
 
imported>ThorstenStaerk
Line 3: Line 3:
 
  # greet
 
  # greet
 
  hello world
 
  hello world
 +
 +
So you can set an alias using the [[command]] alias. With this command you can also show the meaning of a alias:
 +
# alias dir
 +
alias dir='ls -l'

Revision as of 03:45, 23 January 2012

An alias is a string that stands for a command. For example you can define "greet" to be an alias for "echo 'hello world'" like this:

# alias greet="echo 'hello world'"
# greet
hello world

So you can set an alias using the command alias. With this command you can also show the meaning of a alias:

# alias dir
alias dir='ls -l'