How to switch users in Linux

Linux systems have different types of users with different types. The “su” is the easiest way to switch to the administrative account in the current login session. This is especially handy when the root user is not allowed to log in to the system through ssh or using the GUI display manager. Here are some other articles relating to automatic logon. How to enable or disable automatic login on macOS, how to prevent MacBook from automatically Logging outImplementation of Kiosk Mode using Local Settings: Single App Kiosk Setup, how to start an application automatically on macOS, and how to disable automatic screen lock on Ubuntu Desktop with the GUI and dconf Editor.

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

Changing to the root user

test@test-VirtualBox:/$ sudo -i

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x