What does the $ mean in Linux?

I have to explain what the code below means

What does the dollar bit mean?

 user@Linux-003 ~ $

      

+3


source to share


3 answers


In this particular case, the following code means:

Someone with the username "user" is logged in with the hostname "Linux-003".



"~" represents the user's home folder, usually / home / user /, where user is the username, maybe something like / home / johnsmith.

"$" is just a command line character, means that the shell is ready to accept commands, you can understand it as a separator, after which you can interact with the shell. There can also be a "#" to indicate that root is the user who is currently logged in.

+11


source


While most people don't know this, it actually means Swag.

(This actually means "regular user" or "non-root user")



\#

will define the root user.

+4


source


Are you on Mac? On my Mac terminal, this basically means ~ my home directory, and a dollar means I can write a command after it. so this is the user. your home directory. and then a symbol that means you can write commands or not. (There are cases where you might be in an editor where you don't have the $ sign to mean you can't write commands)

0


source







All Articles