Home  >  Article  >  Operation and Maintenance  >  How to switch commands between Linux superuser and ordinary user?

How to switch commands between Linux superuser and ordinary user?

PHP中文网
PHP中文网Original
2017-06-21 11:46:595479browse

The default login is normal user permissions
Display $ symbol

tree@ubuntu:/usr$

Switch super user permissions from normal users:

sudo su

tree@ubuntu:/usr$ sudo su

Enter the password

[sudo] password for tree:

After entering the password, you can switch to the super user.

Switching from super user to ordinary user:
su username

root@ubuntu:/usr# su tree

There is no need to enter a password to switch from super user to ordinary user. Enter the above command. Then press Enter directly

tree@ubuntu:/usr$

This will switch back to a normal user.

The above is the detailed content of How to switch commands between Linux superuser and ordinary user?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn