How do I log out of `sudo su`?
You don't need to use sudo
and su
together--su
switches your user account (without arguments it switches you to root). sudo
just elevates your privileges to root for the current command.
It's reccomended to use sudo
instead of su
if possible, but to return to your normal account after calling su
, simply use the exit
command
Use
su username
to get back to your user level (or a different user)
Or just press Ctrl+D to exit out of root
logout
if usedsudo su -
exit
if usedsudo -s