Re: PATH nfg after su
On Fri, Oct 23, 2020 at 06:49:52PM +0100, Tixy wrote:
> On Fri, 2020-10-23 at 15:11 +0200, Sven Hartge wrote:
> > Tixy <tixy@yxit.co.uk> wrote:
> > > On Fri, 2020-10-23 at 08:19 -0400, Greg Wooledge wrote
> > > > Using "sudo su -" is a new one to me. Not only are you
> > > > wastefully
> > > > running two programs when you only need one.
> > > It's useful (essential?) if you want a root shell when there's no
> > > root
> > > password set like on Ubuntu (and optionally on Debian).
> >
> > No.
> >
> > "sudo -i" does exactly that: Run a shell as "root" and ask for the
> > password of the user calling it.
>
> Thanks. Debian has su installed as part of a required package so I
> never bothered installing sudo, it just seemed to be an Ubuntu thing.
>
> --
> Tixy
>
sudo su - has one advantage: it gives you root's path and root's home directory - so you end up in /home/root or wherever root's
home is set to. Otherwise, you end up, potentially, in the calling user's home directory.
Just my 0.02c
Andy
Reply to: