Jump to content

30 Handy Bash Shell Aliases For Linux


securitybreach

Recommended Posts

securitybreach
An alias is nothing but shortcut to commands. The alias command allows user to launch any command or group of commands (including options and filenames) by entering a single word. Use alias command to display list of all defined aliases. You can add user defined aliases to ~/.bashrc file. You can cut down typing time with these aliases, work smartly, and increase productivity at the command prompt.

 

The general syntax for the alias command for the bash shell is as follows.

 

Task: List aliases

 

Type the following command:

alias

 

Sample outputs:

alias ..='cd ..'
alias amazonbackup='s3backup'
alias apt-get='sudo apt-get'

 

By default alias command shows a list of aliases that are defined for the current user.

 

Task: Define / create an alias (bash syntax)

 

To create the alias use the following syntax:

alias name=value
alias name='command'
alias name='command arg1 arg2'
alias name='/path/to/script'
alias name='/path/to/script.pl arg1'

 

........

http://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...