Monday, 6 May 2019

unix - 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



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).


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...