GNU/Linux Command – ALIAS

alias – Create alias name for a command.
 
Summary:

‘alias’ is Bash build-in command. This is very useful to create a simple alias for a complex/ long/frequent commands. Once alias created, you can use the alias to call the original command. This alias are deleted after closing the shell session. For the next session, you have to create it again. So to avoid this problem, you have to add the alias creation commands in your .bashrc file.
 
Example:
$ alias -- Prints all alias commands  $ alias cls=clear -- Alias for new user from DOS world.  $ alias ls="ls -F --color=always" -- Alias long ls command.  $ alias mycd='cd a/b/c/d/e/f/h' -- Shortcut for long CD.  $ alias ls -- Print the alias' original command.  $ ls -- Skip alias and run the original command.
Read: man bash or help alias

Advertisements
Tagged with: ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: