I'd like to switch to another user without logging out the first user, then log in as a third user without logging out the other two, and so on, then switch between all users quickly. I'd like to insert passwords only once for each user obviously.
Is there an analogous way to do this like with processes, where I can send them to the background and foreground with ctrl-z and fg as needed?
Best Answer
Use
su <user>
, optionally with the-
option (also known as-l
or--login
) to make the shell behave as a login shell (different initialization).You can't really send it to background, since the shell of that user catches the SIGTSTP signal that is used to move it to background and exits (usually). Instead of that you might be interested in a terminal multiplexer like
tmux
orscreen
You might also want to use
vlock
on the consoles when you are not using them for longer time.