How to configure alias in Linux

Source: Internet
Author: User
Tags aliases

How to configure alias in Linux

The alias command is used to set the aliases of the directives. We can use this command to simplify some of the longer commands. When using alias, the user must use the single quote ' ' to cause the original command to be used to prevent special characters from causing an error.
The alias command is only limited to the login operation. To be able to use these command aliases every time you log in, you can store the alias command in Bash's initialization file,/ETC/BASHRC.

Grammar
Alias (option) (parameter)

Options:
-P: Print command aliases that have been set

Parameters:
Command alias settings: Define command aliases, format "command aliases = ' actual commands '"

Instance
The basic way to use alias:
Alias new command = ' original command-options/Parameters '

For example:
Alias "Less=less-n"
Alias Ll= ' Ls-al '

Remove an alias using the Unalias command
Unalias LL

This article is from the "Ouyangjun" blog, make sure to keep this source http://ouyangjun.blog.51cto.com/10284323/1704042

How to configure alias in Linux

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.