Home > System Tutorial > LINUX > body text

How to use alias to create command alias in Linux system?

王林
Release: 2024-01-07 11:46:17
forward
1009 people have browsed it

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 the of the cat command, it is equivalent to the hhcat command

3. You can use the parameter -p to 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 use alias -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!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!