First, Introduction
The alias command is used to set up aliases for Linux shell commands. You can use the alias command to abbreviate a longer command.
Ii. Methods of Use
Syntax: Alias (option) (parameter) option:-P: Print the Linux shell alias parameters that have been set: ' Define Linux shell aliases '
Third, the case
1.alias definition alias ssh_5_13
[[email protected] ~]# alias ssh_5_13= ' ssh [email protected] '
2. View the aliases already set by the system
[Email protected] ~]# aliasalias cp= ' cp-i ' Alias l.= ' ls-d. *--color=auto ' Alias ll= ' Ls-l--color=auto ' Alias ls= ' ls--co Lor=auto ' Alias mv= ' mv-i ' Alias rm= ' rm-i ' Alias Which= ' Alias | /usr/bin/which--tty-only--read-alias--show-dot--show-tilde '
3. Set the alias to take effect for the current user
[Email protected] ~]# VIM/ROOT/.BASHRC #将alias写入到配置文件中 [[email protected] ~]# SOURCE/ROOT/.BASHRC #对配置文件立即生效
Linux alias settings