How to switch commands between Linux superuser and ordinary user?

PHP中文网
Release: 2017-06-21 11:46:59
Original
5490 people have browsed it

The default login is normal user permissions
Display $ symbol

tree@ubuntu:/usr$
Copy after login
Copy after login

Switch super user permissions from normal users:

sudo su

tree@ubuntu:/usr$ sudo su
Copy after login

Enter the password

[sudo] password for tree:
Copy after login

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
Copy after login

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$
Copy after login
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template