No Alias's when sudo'ing
- by Danny Roberts
I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using 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
Is there any reason why you cannot use aliases whilst using sudo?