I'm logged in as a user "foo" which is part of group "wheel" after adding via
pw group mod wheel -m foo. Where is the difference between:
The use of the
login command will ensure that a new login shell (one that changes the environment variable PATH, USER and many others) is started.
su root starts a shell but does not change the environment. That could cause some unexpected problems.
su -login root or
su -l root or
su - root or simply
su - will start a login root shell.
sudo su - will start a login root shell but using the user password (not root password).
This answer has some additional information