Difference between Su and sudo, Su root, and Su-Root

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.