How to switch users under Linux

1. Switch User command is: su username [username is your user name Oh]

2. The switching from ordinary users to the root user can also use the command: sudo su

3. Enter the terminal exit or logout or use the shortcut ctrl + d, can be returned to the original user, in fact, ctrl + d exit command is executed

4. when switching users, if users want to use the new environment after the switching of the user, may be applied between the username and su -, for example: [su - root]

$ Represent the average user

# Indicates a superuser, which is the root user

Guess you like

Origin www.cnblogs.com/niuben/p/11226680.html
Recommended