Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to switch user in Centos

Tags:

centos

I need command to known the command, which switch between users in command prompt. Im using CentOS 6.5 and Putty. Does anybody know this command? Thanks for help

like image 871
user3328390 Avatar asked Feb 19 '14 13:02

user3328390


People also ask

How do I switch users in Linux?

To change to a different user and create a session as if the other user had logged in from a command prompt, type "su -" followed by a space and the target user's username. Type the target user's password when prompted.

How do I switch from one user to another?

Select Start , right-click the account name icon (or picture), then select Switch user. Select the Start button on the taskbar. Then, on the left side of the Start menu, select the account name icon (or picture) > Switch user > a different user.


1 Answers

You can use su to change to another user:

su <username>

for more help with the su command, you can read the man page via the man command:

man su
like image 143
Jason 'Jaypoc' Bauman Avatar answered Nov 10 '22 08:11

Jason 'Jaypoc' Bauman