I'd like to log in as a different user without logging out of the current one (on the same terminal). How do I do that?
How to Switch Between Users on One Terminal in Linux
loginusers
loginusers
I'd like to log in as a different user without logging out of the current one (on the same terminal). How do I do that?
Best Answer
How about using the
su
command?If you want to log in as root, there's no need to specify username:
Generally, you can use
sudo
to launch a new shell as the user you want; the-u
flag lets you specify the username you want:There are more circuitous ways if you don't have sudo access, like ssh username@localhost, but
sudo
is probably simplest, provided that it's installed and you have permission to use it.