5

My user is part of the admin group and I'm used to type sudo su to impersonate root. Unfortunately this generate a non-login shell and if I need one I need to type again /bin/bash -l.

Is there any way to have a login shell directly running a sudo command?

Ignazio
  • 231

1 Answers1

9

sudo -i will give you a login shell.

See the sudo manual.

About sudo su, see "Is there ever a good reason to run sudo su?".

Kusalananda
  • 333,661