root shell

pol linux_milano at yahoo.it
Fri Oct 5 20:11:54 UTC 2007


Derek Broughton wrote:
> pol wrote:
>> commands through sudo: E. the following alias is set in root's .zshenv
>> file, to get a customized file list:
>>  alias l="/usr/bin/limo -w1 -o-m -fUNsm"
>> It works, as i am root (that is i have accessed through 'sudo su -'),
>> yet, as i enter (as norml user) the command 'sudo l' i get
>>  sudo: l: command not found
> 
> Try: sudo -i
> which is the "correct" way to get a root shell.

sudo -i   lets me enter an interactive root shell, the same as 'sudo -su -'.

I believe that 'sudo <command> (e.g 'sudo l', see above) runs a non
interactive shell. If that is so, how to set aliases for non intearactive
shell? 

--
Pol





More information about the ubuntu-users mailing list