alias Introduction to Commands:
This command is used for command aliases, and aliases defined in the shell are valid only for the current Shell life cycle;
The valid range of aliases is only the current SHELLJ process; If you want the alias to be permanently valid, you must define the alias in the alias
In the configuration document (/ROOT/.BASHRC---/root represents the current user's home directory/.BASHRC configuration document).
1 . command format:
Alias Cmdalias=command [OPTIONS]
Cmdalias: alias symbols that need to be defined
Command: Existing commands
Unalias cmdalias Revoke the alias of the Cmdalias definition
2 . Command function:
Define aliases to make existing commands more concise.
3 . Command parameters:
/
4 . Command instance:
1. Define Command aliases:
Alias Cl=clear
[[email protected] ~]# alias Cl=clear set the clear command alias to CL
[[email protected] ~]# CL
[[email protected] ~]# alias view existing command aliases
Alias Cl= ' Clear ' here already has the CL command alias just set up
Alias cp= ' Cp-i '
2. Cancel command aliases:
Unalias CL Cancel Command alias
[[email protected] ~]# unalias cl Cancel CL Command alias
[[email protected] ~]# alias
Alias cp= ' Cp-i ' here is no CL command alias
Alias l.= ' ls-d. *--color=auto '
This article is from the "Learn Linux history" blog, please be sure to keep this source http://woyaoxuelinux.blog.51cto.com/5663865/1860467
Linux command: Alias