Alias command function description: some of the commands that we often use but are very long at system management. Then we can create an alias for these long strings of commands. This long string of commands can be directly replaced by an alias. The system already has some default command aliases. It can be viewed in alias. You can also view ~ /. Bash_profile. this is the alias of the user. To define a global alias, you can write the definition to the/etc/bashrc file. Use the Alias command
Function description:We must have some commands that we often use but are very long at system management. Then we can create an alias for these long strings of commands. This long string of commands can be directly replaced by an alias. The system already has some default command aliases. It can be viewed in alias. You can also view ~ /. Bash_profile. this is the alias of the user. To define a global alias, you can write the definition to the/etc/bashrc file. Aliases that are passed through alias are automatically cleared after the system is restarted. After the modification, it takes only a moment for the source to take effect.
Syntax:Alias [alias] = [command name]
Cancel alias: Unalias [alias]
Instance used:
(1) default system alias
[Root @ LiWenTong test4] # alias
Alias cp = 'CP-I'
Alias l. = 'ls-d. * -- color = tty'
Alias ll = 'ls-l -- color = tty'
Alias ls = 'ls -- color = tty'
Alias mv = 'MV-I'
Alias rm = 'rm-I'
Alias which = 'Alias |/usr/bin/which -- tty-only -- read-alias -- show-dot -- show-til
Note: When defining an alias, there cannot be spaces on both sides of the equal sign.
------------------------------- Subsequent self-summary ------------------------------------------
[PS: To be honest, this really cannot be understood again. it's just the equation generation in junior high school. Alias stands for aliases in English. It is just to give long things an alias for easy use. In addition, the system also has some aliases. for example, the command alias is the command itself + parameter.]