[conspire] sudo -i vs sudo su -

Michael Paoli Michael.Paoli at cal.berkeley.edu
Wed Nov 11 02:47:48 PST 2009

> Date: Wed, 4 Nov 2009 14:58:20 -0800
> From: Steve M Bibayoff <bibayoff at gmail.com>
> Subject: [conspire] sudo -i vs sudo su - ? [Was:] Help with GRUB
> To: conspire at linuxmafia.com

> On Wed, Nov 4, 2009 at 12:04 PM, Rick Moen <rick at linuxmafia.com> wrote:
>> Quoting Nick Moffitt (nick at zork.net):
>>> ? ? ? 2. sudo -i
>> On reflection, "sudo su -" is probably the method one should favour.
> Reason?
> I instinctively run "sudo su -" instead of "sudo -i", but really don't
> know why(probably because I learned the former first or maybe because
> I use "su user" alot)

$ sudo su -
is typical "best practice".  It provides a more "clean", proper, and
expected environment, and also adds a bit more logging.  Where/when sudo
isn't available, one would instead typically use:
$ su -
In some environments, other software (rather like sudo on steroids)
may be used in place of sudo - but again, in a quite similar manner, e.g.:
$ <sudo_on_steroids> su -

More information about the conspire mailing list