Su and sudo, su root and Su-root differences

Source: Internet
Author: User
Su and sudo, su root and Su-root differences

Su is the front two letters of the superuser.

Su Root=su
Like your open an interactive shell in Root name,
Then only. BASHRC'll be sourced.

Su Root and Su: to establish a link with root, execute the command through root, is actually the process's valid user ID into the Root,unix check process is the right to verify the valid user ID, the actual user ID of the process is currently logged on to the system user, The home directory is also the home directory of the user who is currently logged on to the system.

Sudo-i

Just like login as root and then the shell is login shell,
Which mean it would expericene a login process,
usually. Bash_profile and. BASHRC will be sourcedsudo-i to log in as root, the actual user ID and valid user ID of the process become root, and the home directory is also switched to the home directory of root. When the sudo command executes the command, the process's valid user ID is temporarily changed to root.

Su and sudo, su root and Su-root differences

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.