Su-root:
Just like Login as root, then the shell is Login
Shell,
Which mean it will expericene a login process,
Usually
. Bash_profile and. bashrc will be sourced
Su Root
Like you open
Interactive Shell in root name,
Then only. bashrc will be sourced.
Difference between Su and sudo:
1. Commonalities: root user permissions;
2. Differences: su only obtains the root permission, and the work environment remains unchanged. The user's work environment is still switched. sudo completely obtains the root permission and the root work environment.
What is the difference between Su-root and Su root?
Su-root: indicates that the user logs on as root. Just like Login as root, then Shell is login shell, Which mean it will expericene a login Process, Usually. bash_profile and. bashrc will be sourced Su Root: creates a link with root and runs the command through root. Like you open an interactive shell in Root Name, Then only. bashrc will be Sourced. |
The most direct difference is that the su directory is the original user directory.
However, after su or Su-root, the directory becomes the root user's home directory.