Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I accidentally did


with no arguments while logged into the root account.

It then put me into su and at the beginning of the command line, it now shows


How do I "get out of" su and return back to just root?

share|improve this question

Same way you get out of every other shell.

share|improve this answer
OR pressing CTRL-d at the prompt – mdpc Dec 24 '12 at 3:56
But when I do exit, it just completely quits out of PuTTY and when I log back in, its still showing the same. – ncms1 Dec 24 '12 at 3:57
That doesn't sound right; su shouldn't have caused that. Did you perhaps do something else? – Ignacio Vazquez-Abrams Dec 24 '12 at 3:58
It was just su and maybe a - at the end if I can try to remember my hardest. – ncms1 Dec 24 '12 at 3:59
It is not "stuck in su". Your shell configuration files are missing. Copy them back from /etc/skel. – Ignacio Vazquez-Abrams Dec 24 '12 at 4:21

su and root are the same thing.

To login as another user, do

su username
share|improve this answer
But how do I return to the normal [root@hostname]# – ncms1 Dec 24 '12 at 3:58
that is just the prompt you are talking about. you can do exit to leave the current prompt or do "source ~/.bashrc" or "source ~/.cshrc" to source default profile of your shell. – daya Dec 24 '12 at 4:02
That returns No such file or directory on CentOS 6 – ncms1 Dec 24 '12 at 4:04

You must log in to answer this question.

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