Linux CMD Tool Series 01-alias

Source: Internet
Author: User
Tags aliases

The alias cmd list your current aliases. For example:

Alias

Use alias to shorten a long cmd in current Shell session:

alias [name=['command']]

Use unalias to remove the alias, or use ' \ ' (back-slash) before command to DISA Ble alias.

Your ~/. BASHRC file might look like:

cp='cp? VI'ifrm='rm? I'  ifmv='mv? I'if you're going to Overwrite something

system-wide Aliases can put in the /ETC/BASHRC

If you is already in a shell session and you want to apply the new BASHRC immediately :

SOURCE ~/.BASHRC

Examples:

1. Simplify pathing

Alias.. ='CD. ' alias ... ='CD. /.. /'alias .... ='CD. /.. /.. /'alias ... .. ='CD. /.. /.. /.. /'

2. Call multiple Cmds

Alias pl='pwd; LS'

3. Call other aliases

Alias p="pwd"alias L="ls-la"alias L= " p; L "

4. Creating, separate aliases simultaneously

Alias p="pwd"; L="ls-al"

5. Remove all aliases

Unalias-a

Linux CMD Tool Series 01-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.