Linux

How to switch users in Linux

How to switch users in Linux on the command line using “sudo su”

su, also referred to as substitute user, super user, or switch user, is used by a computer user to execute commands with the privileges of another user account. When executed it invokes a shell without changing the current working directory or the user environment.

root@test-VirtualBox:~# su test
test@test-VirtualBox:/root$

changing to root user

test@test-VirtualBox:/$ sudo -i

 

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x