49

I just gained root access following steps from the http://www.wikihow.com/Become-Root-in-Ubuntu. My prompt get changed from $ to # sign, indicating I have root access. Now I have come out or log out or disable root access. For that I tried sudo passwd -dl root. Then it shows the message:

passwd: password expiry information changed.

But I still have root access, and I am still having # sign instead of $.

root@hostname:~# still appears instead of xyz@hostname:~$.

76

From what I gather you're simply trying to return to your user account after gaining access to root.

Try typing

exit

in terminal. Or you can simply press CTRL+D.

| improve this answer | |
  • 3
    This just closed the whole ssh client. – BluE Oct 31 '18 at 20:28
  • CTRL-D did it for me from root@ to linux shell. The good old 'exit' was not recognized or 'quit' did not work either. – Mugé Aug 31 '19 at 14:08
12

Just type exit and you will leave the root shell and get a shell of your previous user.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.