4 ms·
su is unnecessary; sudo -s is equivalent to sudo su, but allows the admin to restrict who may sudo to whom, for which programs, and so on.
by lubutu 15y ago
su is unnecessary; sudo -s is equivalent to sudo su, but allows the admin to restrict who may sudo to whom, for which programs, and so on.
- guns 15y agoThey are not equivalent. `sudo su` changes the values of USER, HOME, and SHELL to that of the root user. `sudo -s` only changes USER (it seems), but HOME is retained as the SUDO_USER's home directory. Neither invocation changes the working directory, which is convenient.