I have typed sudo su in the Terminal, and then I typed whoami, and the Terminal said that I am the root user. So does that mean that sudo su makes me the root user or am I missing something?


Yes. You have the answer in man su:

   su [options...] [-] [user [args...]]

   su allows to run commands with substitute user and group ID.

   When called without arguments su defaults to running an interactive shell as root.

Note that the recommended method to do so is sudo su -, as it starts the root shell with a login shell environment:

   -, -l, --login
          Starts the shell as login shell with an environment similar to a real login:

             o      clears all environment variables except for TERM

             o      initializes the environment variables HOME, SHELL, USER, LOGNAME, PATH

             o      changes to the target user's home directory

             o      sets argv[0] of the shell to '-' in order to make the shell a login shell

or directly run sudo -i as explained in this answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.