The alias command is used to set the alias of the command. We can use this command to simplify some long commands. The function of the alias command is limited to the login operation. Let's take a look at the detailed tutorial below.
1,Grammar format: alias [parameter]
For example, we give the operation: cat command an alias hhcat, and the command is: alias hhcat= cat
2. When we use theof thecat command, it isequivalent to the hhcat command
3. You can use theparameter -pto print the set command alias
4. If you want to cancel a command alias,use the unalias command, the format is "unalias alias", we can cancel the hhcat alias just now , the command is: unalias hhcat
5. When we usealias -p to check again, we can see that the hhcat alias command is gone
6. If you want to use these command aliases every time you log in, you can store the corresponding alias commands in the bash initialization file/etc/bashrc.
The above is the detailed content of How to use alias to create command alias in Linux system?. For more information, please follow other related articles on the PHP Chinese website!