Su -- Super User
Su or su root: Convert the current identity to root, and the User Shell has not changed. therefore, some system commands cannot be used. su-, Su-l, or Su-l root can completely convert the current environment to the root environment. as root login directly. second, the path of the service is/sbin/service. If the shell does not change, NO/sbin is found in your path by default. Therefore, no result is returned. If you use the Su-command environment to change to root, path contains/sbin
Function Description: Change the user identity.
Syntax: su [-flmp] [-- help] [-- version] [-] [-C <command>] [-S] [User Account]
Note: su allows users to temporarily change their login identities. Enter the user account and password to be changed.
Parameters:
-C <command> or -- command = <command> restores the original identity after the specified command is executed.
-F or -- fast is applicable to CSH and Tsch, so that the shell does not need to read the Startup File.
-.-L or -- when login changes its identity, the working directory, home, Shell, user, and LOGNAME are also changed. In addition, the PATH variable is also changed.
-M,-P, or -- preserve-environment do not change environment variables when changing identities.
-S or -- shell = specifies the shell to be executed.
-- Help: displays help.
-- Version: displays the version information.
[User Account] specifies the user to change. If this parameter is not specified, it is changed to root by default.