Usage and differences of "Linux" Su, sudo, sudo su, sudo-i

Source: Internet
Author: User

sudo: temporarily switch to Superuser mode to perform superuser privileges, prompting for a password that is the current user's password, not the password for the super account. However there is a time limit, Ubuntu defaults to 15 minutes for one time.
SU: Switch to a certain user mode, prompted to enter the password when the password is Switched account password, the use of "SU account name." If the system defaults to the root account when no account is added, the password is also the password for the super account. There is no time limit.
Sudo-i: You can use this command to frequently perform certain permissions that only the superuser can perform, without having to enter the password each time. When prompted for a password, the password is the password for the current account. There is no time limit. After executing the command, the prompt changes to "#" instead of "$". You can perform "exit" or "logout" when you want to return a regular account.


Sudo-i directly run the sudo command plus-i parameter
sudo su runs the sudo command to give the SU command a right to run the SU command.
Sudo-i Running Results pwd=/root
sudo su run result pwd=/home/user name (current user home directory)

Usage and differences of "Linux" Su, sudo, sudo su, sudo-i

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.