How to Switch Users in Linux Shell

How to Switch Users in Linux Shell thumbnail
Switch users in Linux Shell.

One of the great benefits of using Linux Shell is the ability to switch users while staying in the Shell window. Simply type a command followed by the user name to switch users. You will need the other user's password to switch accounts.

Things You'll Need

  • Linux operating system
  • User passwords
Show More

Instructions

    • 1

      Boot your computer and open a Shell window.

    • 2

      Type the "su" command, followed by the user name that you would like to switch to, and press "Enter." The command line should look like this: su Mary.

    • 3

      You will now be prompted for the user's password. Once you enter the correct password for the user, you will have access to all of the user's files.

    • 4

      Once you are finished with the other user's account, return to your account by typing the command "Exit."

Tips & Warnings

  • If you are an administrator and need to use the root account easily, you can create one by typing: sudo passwd root.

  • Once you create a root account, you can easily switch to it while in Shell by simply typing "su," without a username.

Related Searches:

References

  • Photo Credit Jupiterimages/Comstock/Getty Images

Comments

You May Also Like

Related Ads

Featured