Get the App
SLTechnology News&Howtos  ›  Servers  › 

Linux basic command-alias alias

Shulou Source: shulou.com Published: 2022-06-02 09:41:36 10月25日 Update

Alias

Alias prints a list of aliases in the form of "name=value" on standard output without arguments or using the-p option. When a parameter is provided, define an alias for each name given by its value. The trailing space in the value causes you to check whether the next word replaces the alias when you extend the alias. For each name in the parameter list for which no value is provided, the name and value of the alias are printed. Aliases return true unless you give a name for which no aliases are defined.

The scope of application of this command: RedHat, RHEL, Ubuntu, CentOS, Fedora.

1. Grammar

Alias [- p] [name [= value]...]

2. List of options

Option

Description

-p

List all aliases as "key=val"

3. Examples

Delete aliases that have been defined

[root@localhost ~] # alias / / View aliases have been defined and mytail no longer exists

Alias cp='cp-i'

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

Alias ll='ls-l-color=auto'

Alias ls='ls-color=auto'

Alias mv='mv-i'

Alias rm='rm-i'

Alias which='alias | / usr/bin/which-tty-only-read-alias-show-dot-show-tilde'

Tags: Aliases names parameters commands words instances forms methods standards spaces scope syntax scope check output basis Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info macOS OPPO Reno Shulou Information Huawei