securitybreach Posted January 2, 2015 Share Posted January 2, 2015 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 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.