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 Answers
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.

- 878
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#
forroot
(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.

- 26,018
$
), and there is a typical root prompt (#
). Both can be customized to something else. So your phrase "normal terminal that has$
root symbol" could be interpreted two different ways. – user535733 May 24 '23 at 23:46