Linux Command alias/unalias

Source: Internet
Author: User

Alias
 
Function Description:
 
SET command alias
 
Syntax:
 
Alias [alias] = [command name]
 
Parameters:
 
: If no parameter is added, all current alias settings are listed.
 
 
 
Unalias

Function Description:
 
Delete alias
 
Syntax:
 
Unalias [-a] [alias]
 
Note:
 
Unalias is a shell built-in command that deletes alias settings.
 
Parameters:
 
-A: delete all aliases.
 
Command practice:

[Root @ www.bkjia.com ~] # Alias view the current command alias
 
Alias cp = 'cp-I'
 
Alias l. = 'LS-d. * -- color = 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'
 
[Root @ www.bkjia.com ~] # Alias lm = 'LS-l | more'
 
[Root @ www.bkjia.com ~] # Alias
 
Alias cp = 'cp-I'
 
Alias l. = 'LS-d. * -- color = tty'
 
Alias ll = 'LS-l -- color = tty'
 
Alias lm = 'LS-l | more '<=
 
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'
 
[Root @ www.bkjia.com ~] # Unalias lm cancelling command alias
 
[Root @ www.bkjia.com ~] # Alias
 
Alias cp = 'cp-I'
 
Alias l. = 'LS-d. * -- color = 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'
 
[Root @ www.bkjia.com ~] #

Related Article

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.