Linux under the alias command detailed
Description of Use
Sets the alias of the command. In a Linux system, if the command is too long and does not conform to the user's habits, then we can specify an alias for it. Although you can create a "link" for a command
Resolves a long file name problem, but for commands with command-line arguments, the link is powerless. The specified alias can resolve all of these problems, "1". Common aliases to simplify
SSH Login "See example three", make the long command shorter, so that the usual long command line shorter, forced to execute the command when asked.
Feature Description: sets the alias of the directive.
syntax:alias[alias]=[directive name]
If no parameters are added, all current alias settings are listed.
[Email protected]:~$ alias
Alias egrep= ' Egrep--color=auto '
Alias fgrep= ' Fgrep--color=auto '
alias grep= ' grep--color=auto '
alias l= ' LS-CF '
alias La= ' Ls-a '
alias ll= ' Ls-alf '
alias ls= ' ls--color=auto '
Description: user can use alias, custom instruction aliases.
If you enter alias only, you can list all of the current alias settings.
Attention:
Alias can be used to turn a long command into any of our favorite short
Alias is only valid for the login operation. To automatically set an alias every time you log in, you can set an alias for the directive in/etc/profile or your own ~/.BASHRC.
File:
/etc/profile or he refers to other files (such as/ETC/BASH.BASHRC in Ubuntu 12.0.4). This is a global one. It is not recommended to modify this file, the error will cause startup problems.
If you want to give each user an alias, add alias la= ' Ls-al ' line to the last side of the/ETC/BASHRC, BASHRC is the configuration file for the environment variable
~/.BASHRC is the current user, but it must be done before bash is started.
The difference between/ETC/BASHRC and ~/.BASHRC is that one is set to a system-wide one that is set up for single-user use.
Of course: For how to cancel an alias for a command in Linux
1, if added in the configuration file, you need to modify, delete the corresponding statement
2, if only temporary effect, you can enter the unalias corresponding command (such as: Unalias clear) can
[Email protected]:~$ alias c=clear[email protected]:~$ Unalias Clear
Linux under the alias command detailed