Command: Su[options] Username
-,-l,--login:make Shell as login shell, which makes a shell a login shell, such as executing Su-pzhang, indicates that the user wants to change the identity to become Pzhang, and uses the Pzhang user's environment variable configuration. such as:/ Home/pzhang/.bash_profile, etc.
-C,--command=command:pass a single command to the shell with-c switch to a shell, execute a command, and then exit the user environment that you are switching to.
-S,--Shell
Root authorization
Command: sudo [options]
Note: with the sudo command, we can classify certain superuser privileges into specific (fine) authorization to the specified ordinary user, and the normal user does not need to know the root password to use the obtained authorization (root privileges that the administrator really allows). So it's no exaggeration to say that The sudo command, relative to the SU command, has made a lot of progress in the management of the system user's rights, and the centralization management has been guaranteed in theory, which strengthens the security aspect of the system.
Visudo Modifying a user's permissions is approximately equivalent to modifying/etc/sudoers
Add% (Percent semicolon) for group authorization
Nopasswd:all representative does not require password execution commands
-l:list
-C: Configuration file Syntax check
linux-Command-su-sudo