undo sudo

Rashkae ubuntu at tigershaunt.com
Wed May 21 20:40:38 UTC 2008


Steve Lamb wrote:
> On Wed, May 21, 2008 11:00 am, Wulfy wrote:
>> Please can you tell me what you can do with root that you can't do with
>> sudo?
> 
> cd /var/log/exim4
> ls
> 
>     The elevated privilege is not a state thus any time you need to run a
> sequence of commands which require it as a state it fails.  Yes, I
> consider having to prefix multiple commands with sudo as a failure, esp
> when some of those commands are shorter than sudo, such as the above
> case with ls.
> 
>     Of course I get around it by simply putting the following alias in my
> .zshrc file on Ubuntu systems:
> 
> root = "sudo su -s"
> 

You could just simply use sudo -s

Or sudo -i if you need all of root's default environment variables (such
as $HOME) as well.






More information about the ubuntu-users mailing list