Score:0

How to return to normal root user

US flag
user1699284

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

ar flag
Press the two buttons CTRL+D.
Will avatar
id flag
Or you can type exit
user535733 avatar
cn flag
I think you may be misusing the term "root." There is a typical user prompt (`$`), 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.
Score:1
cg flag

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.

Score:0
vn flag

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.