Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the Linux alias command

Shulou Source: shulou.com Published: 2022-06-01 19:18:32 10月03日 Update

In this article, the editor introduces in detail "how to use the Linux alias command", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to use the Linux alias command" can help you solve your doubts.

In the Linux system, the alias command is used to set the alias of the instruction, and you can use the alias command to simplify some longer commands.

Syntax alias [alias] = [instruction name] parameter description: if no parameters are added, all current alias settings are listed.

Commonly used commands show temporary settings

Alias``cp`` = ``'cp-i' unalias``cp`` cancel the command of the system to take effect permanently

# for root users: vi / root/.bashrc edit alias cp='cp-I 'source / root/.bashrc command takes effect # for all users: vi / etc/profile (global variable file) = > vi / etc/bashrc (global variable file) alias cp='cp-i' source / etc/profile = = >. / add common aliases for etc/profile command to take effect

Alias rm='rm-f 'alias... =' cd.. /..' Alias.... ='cd.. / 'alias egrep='egrep-- color=auto' alias grep='grep-- color=auto' alias l.='ls-d. *-- color=auto' alias ll='ls-l-- color=auto' alias ls='ls-- color=auto' alias l='ls-AlF'

Read here, this "how to use Linux alias command" article has been introduced, want to master the knowledge of this article also need to practice and use to understand, if you want to know more about the article, welcome to follow the industry information channel.

Tags: Commands aliases articles global content parameters variables instructions files users systems proper names commonly used common ideas new knowledge more steps knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Linux Shulou Technology OPPO Reno NVidia