How Do I Switch Between Users and Roots in Linux?
Contents How Do I Switch Back from User to Root? to Get Root Access, You Can Use One of a Variety of Methods: Run Sudo and Type in Your Login Password, If...
Contents
How do I switch back from user to root?
To get root access, you can use one of a variety of methods:
- Run sudo <command> and type in your login password, if prompted, to run only that instance of the command as root. …
- Run sudo -i . …
- Use the su (substitute user) command to get a root shell. …
- Run sudo -s .
Must Read
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.