Linux basic command-alias alias
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'