0

I know this is extremely basic, but I am using Ubuntu Linux and I have just typed in

sudo su

I entered my password and performed the actions that I had to get done. Now how do I stop being root and go back to being a normal user? I'm afraid I'll mess something up like rm -rf /.

1

2 Answers 2

5

User privileges are associated with processes. In this case, your superuser privileges are associated with the shell that ran when you did sudo su. You need to exit that shell. To do that use the aptly-named exit command.

If you haven't messed with the prompt definitions, superuser status is indicated by a # in the prompt instead of the user's $.

2
  • Thanks a lot. Immediately after writing my question, I tried "su my_name", because I realized it stands for substitute user. I also thought it worked, until I tried "exit" as you suggested, haha. Apr 16, 2013 at 23:25
  • 1
    Also you can use hot key combination 'Ctrl+D' to to exit superuser shell. Aug 2, 2014 at 7:38
1

When you su, a new login shell is started for the root user; to drop root privilege and go back to your usual login, simply logout or hit Control-D.

Not the answer you're looking for? Browse other questions tagged .