Difference between a root and non-root shell prompt
Written on January 14th, 2011 at 20:49 pm by shredder12
Have you ever looked at the command prompt carefully? Exactly! we usually don't care about the prompt. All we see is the little symbol at the end designating the prompt(usually its “$”) or at most look at the current working directory. This way sometimes we might not realize its actually a root prompt. This happens a lot when you are working at multiple terminals. So, in order to prevent a big mistake from happening, the super-user or root’s prompt ends with a “#”, instead of “$” in case of a non-root user.
Now you know the significance of a single character
.




























7 Comments
I hardly ever login as root on debian systems. So, I don't think I ever set any passwd for root. The one I remembered was my own(user "sahni") so went for "sudo su".
There are other commons characters too - ">", "%" and ":". I don't think there is any historic significance related to their usage but if I had to guess, "$" probably became popular from the earlier unix shell "sh". Try "sh" or "/bin/sh" on your shell.
Post new comment