我今天在玩别名,我注意到别名在使用时似乎不可用sudo:
danny@kaon:~$ alias
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'
danny@kaon:~$ ll -d /
drwxr-xr-x 23 root root 4096 2011-01-06 20:29 //
danny@kaon:~$ sudo -i
root@kaon:~# ll -d /
drwxr-xr-x 23 root root 4096 2011-01-06 20:29 //
root@kaon:~# exit
logout
danny@kaon:~$ sudo ll -d /
sudo: ll: command not found
Run Code Online (Sandbox Code Playgroud)
有什么理由不能在使用时使用别名sudo吗?