Linux alias alias Command

Source: Internet
Author: User
Tags egrep

First introduce the alias of the command, how to view it? Let's use the which command to see what the complete command is [[email protected] ~]# which lsalias ls= ' ls--color=auto '          /usr/bin/ls[[email protected] ~]# which Llalias ll= ' ls-l--color=auto '          /usr/bin/ls Some orders, there is alias; The alias representation is a combination of a command plus option to form a new command if you want to see which commands in the system are aliased? Then use alias to [[email protected] ~]# aliasalias cp= ' cp-i ' Alias egrep= ' Egrep--color=auto ' Alias fgrep= ' Fgrep--color= Auto ' Alias grep= ' grep--color=auto ' 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 ' actually use the which command to search for the $PATH environment variable by looking at the path of a command or file. [[email protected] ~]# echo $PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin can also customize aliases: [[email  protected] ~]# alias xiao= ' Ls-lha ' [[email protected] ~]# xiaototal 32kdr-xr-x---.   3 root root& Nbsp; 163 jun  1 09:26. Dr-xr-xr-x. Root root  224 May 15 23:29. -RW-------.   1 root root 1.5K may 23:29 anaconda-ks.cfg-rw-------.   1 root root 1.2K May 16 00:09. Bash_history-rw-r--r--.   1 root root   18 Dec 29  2013. Bash_logout-rw-r--r--.   1 root root  176 Dec 29  2013. bash_profile-rw-r--r--.   1 Root root   176 Dec 29  2013. bashrc-rw-r--r--.   1 root root  100 Dec 29  2013. CSHRCDRWXR-----.   3 root root   19 May 00:04. pki-rw-r--r--.   1 Root root & nbsp;129 Dec 29  2013. tcshrc-rw-------.   1 root root 1.1K jun  1 09:26. Viminfo to cancel a custom alias: [[email protected] ~]# unalias xiao[[email protected] ~]# Xiao-bash:xiao:command not found

Linux alias alias command

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.