Linux alias command parameters and usage-Linux definition command alias

Source: Internet
Author: User

Command:Alias

Function Description:SET commandAlias.

Syntax:Alias [alias] = [command name]

Note:You can use alias to customize the alias of the command. If you only enter alias, all current alias settings can be listed. Alias is valid only for this login operation. If you want to automatically set an alias for each login, you can go to/etc/ProFileOr your own ~ /. Set the alias of the command in bashrc.

Also, if you want to give each user an alias that takes effect, set alias LA ='Ls-Al' is added to the end of/etc/bashrc. bashrc is the configuration file/etc/bashrc and ~ of the environment variable ~ /. The difference between bashrc and bashrc is that it is set for all systems to be set for individual users.

Parameters:If no parameter is added, all current alias settings are listed. Materials from www.linuxso.comLinux Security Network

Alias definition provided by centos5.6

To cancel an aliasCommandPrefix \, for example \Mkdir

Root@linuxso.com ~ # Aliasalias CP = 'Cp-I 'alias L. = 'LS-D .*-- Col OR = 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-tilde' some systems do not have the ll command, the reason is that the alias LL = 'LS-l -- color = tty 'is not defined. Using alias, you can change a long command to any simple setting and modifying alias command alias format that we like. LL = 'LS-l -- color = tty 'if you want to take effect permanently, write this article to/etc/bashrc.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.