How Do I Login as a Different User in Linux?
Contents How Do I Login as Another User in Linux? to Change to a Different User and Create a Session as If the Other User Had Logged in from a Command Prompt...
Contents
How do I login as another user 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.
Must Read
How do I switch users in Linux?
- In Linux, the su command (switch user) is used to run a command as a different user. …
- To display a list of commands, enter the following: su –h.
- To switch the logged-in user in this terminal window, enter the following: su –l [other_user]