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