Today on the server through SU Hadoop switch users, using JPS can not see the start of the Spark program, cannot find the JPS command, the original is SU does not change the current environment variables.
Su-root is the same as Su-
Just like login as root and then the shell is login shell,
Which mean it'll expericene a login process,
usually. Bash_profile and. BASHRC would be sourced
The SU root is the same as Su
Like you open a interactive shell in Root name,
Then only BASHRC would be sourced.
Su does not add the user is the default cut to root
Su is not changing the current variable
Su-is changed to switch to the user's variable
That is, SU can only get execution rights for root and not get environment variables
And Su-is to switch to root and get root's environment variables and execute permissions
Grammar:
The SU[USERNAME]SU command can be used to interactively change your user ID and group ID. SU is an abbreviation for Switchuser or Setuserid. This command allows you to open a subprocess, become a new user ID, and grant access to access to all files associated with this user ID. Therefore, for security reasons, when you actually convert your identity, you are