Linux Next alias command specific explanation
Description of Use
Sets the alias of the command. Assuming that the command is too long and not consistent with the user's habits in a Linux system, we can assign an alias to it.
Although it is possible to establish a "link" to the command
Resolves a problem with long file names, but for commands with command-line parameters, the link is powerless. Specifying an alias can solve all of these problems.
Often use aliases to simplify
SSH login. Shorten the long command. Makes frequently used long command lines shorter, forcing commands to be queried when running, and so on.
Feature Description: sets the alias of the directive.
syntax:alias[alias]=[directive name]
If you do not add any number of parameters. Lists all of the alias settings at the moment.
[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 take advantage of alias. The alias of the custom directive.
If you enter alias only, you can list all of the alias settings for now.
Attention:
Using alias can turn a very long command into a casual, short, we like.
Alias is only valid for the login operation. Each time you log in, you are actively setting up an alias. You can set an alias for an instruction 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 change this file, the error will cause startup problems.
If you want to give each user an alias, add the alias la= ' Ls-al ' line to the last side of the/ETC/BASHRC. BASHRC is a configuration file for environment variables
~/.BASHRC is the current user. Just have to start bash before it is implemented.
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 the alias of a command in Linux
1, if added in the configuration file, you need to change, delete the corresponding statement
2, assuming only temporary effect, can input unalias corresponding commands (such as: Unalias clear) can
[Email protected]:~$ alias C=clear
[Email protected]:~$ Unalias Clear
Linux Next alias command specific explanation