computer/properties

Paul Smith paul at mad-scientist.net
Sat Jun 7 18:40:47 UTC 2014


On Sat, 2014-06-07 at 09:35 -0700, Dave Stevens wrote:
> Quoting AFJ Headquarters <agents4jesus at gmail.com>:
> > I understand the fact that sudo lets one operate as if one was in  
> > root, but I was talking about just logging into su so that one  
> > doesn't have to type sudo at every time. (or input their password)
> 
> use sudo su - then password then you'll stay as root. good luck

It's even simpler than that; run:

  sudo -s

to ask sudo to start a shell as root, instead of just running one
command and exiting.

If you need to run as another user (not root) you can use:

  sudo -u <user> <cmd>

or:

  sudo -u <user> -s

to get a shell.


By the way, you don't have to type your password every time you use
sudo.  When you enter your password sudo will remember that you
successfully authenticated for some time (I think the default is like 5
minutes) so any sudo command you run from that same shell during that
time does not require the password again.

So you can run lots of commands in a row and only need to type your
password once.





More information about the ubuntu-users mailing list