Command: sudo su –


I understand what su - does

  • logs you into root with the root environment
  • (as opposed to su which logs you into root with your environment)

And I understand what sudo does

  • you are root for one command

But I am unsure what this does: sudo su -

Anyone care to clarify

Best Answer

In addition to what you said, su requires the root password and sudo requires your user password

Therefore sudo su - will put you into a root environment but it will ask you for your user password instead of the root password (once sudo has given you root privileges, su - can be executed with no password).