-1

can someone assist, i would like to return to my normal terminal that has $ root symbol. Right now am in terminal with # root symbol saying bash, how do i get back to the $ root

2 Answers2

0

The symbol that you see doesn't really matter too much, other than a customisable indication of which user is logged in. The command prompt that you see is highly customisable using the PS1 environmental variable.

If you want to know which user you are currently logged in as, the command you need is: whoami

If you want to switch to another user, try:

su <username>

or ctrl-D to exit the current shell and return to your previous shell.

moo
  • 966
0

Your question seem to be about the special variable \$ that are available in the Bash prompt, which is also explained here.

The variable \$ in the PS1 prompt is really simple:

  • \$ expands to # for root (UID = 0) and $ for all other users.

In relation to your question, this means that if the prompt shows #, then you ARE logged in as root. If you then type exit and Enter and the prompt now shows $, this means you ARE NOT logged in as root.

The variable \$ is simply a quick way to indicate whether you're logged in as root (UID = 0) or not.

Artur Meinild
  • 31,035