Linux command: Alias

Source: Internet
Author: User

alias Introduction to Commands:

This command is used for command aliases, and aliases defined in the shell are valid only for the current Shell life cycle;

The valid range of aliases is only the current SHELLJ process; If you want the alias to be permanently valid, you must define the alias in the alias

In the configuration document (/ROOT/.BASHRC---/root represents the current user's home directory/.BASHRC configuration document).

1 . command format:

Alias Cmdalias=command [OPTIONS]

Cmdalias: alias symbols that need to be defined

Command: Existing commands

Unalias cmdalias Revoke the alias of the Cmdalias definition

2 . Command function:

Define aliases to make existing commands more concise.

3 . Command parameters:

/

4 . Command instance:

1. Define Command aliases:

Alias Cl=clear

[[email protected] ~]# alias Cl=clear set the clear command alias to CL

[[email protected] ~]# CL

[[email protected] ~]# alias view existing command aliases

Alias Cl= ' Clear ' here already has the CL command alias just set up

Alias cp= ' Cp-i '

2. Cancel command aliases:

Unalias CL Cancel Command alias

[[email protected] ~]# unalias cl Cancel CL Command alias

[[email protected] ~]# alias

Alias cp= ' Cp-i ' here is no CL command alias

Alias l.= ' ls-d. *--color=auto '


This article is from the "Learn Linux history" blog, please be sure to keep this source http://woyaoxuelinux.blog.51cto.com/5663865/1860467

Linux command: Alias

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.