Skip to content

Instantly share code, notes, and snippets.

@syreal17
Created February 20, 2020 17:48
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syreal17/dc1340fef44be3dc59819e3379c3fe28 to your computer and use it in GitHub Desktop.
Save syreal17/dc1340fef44be3dc59819e3379c3fe28 to your computer and use it in GitHub Desktop.
pico Primer for Competitors - Shell Chapter - Got Shell? Section
Q.4: What does `$` mean?
A.4: `$` is a separator. Everything before it is the computer generated prompt and everything after is the user typed command
Note on answer: Most example commands I show will start with `$` just as an indicator that the example command is ran in the shell.
@alial3mamy
Copy link

مع ملاحظة: أنه إذا كان المؤشر$ فهذا يدل على أنك مستخدم عادي أي بدون امتيازات الجذر. أما إذا كنت تعمل بصلاحيات الجذر سيظهر لك علامة #.

@syreal17
Copy link
Author

Great note, thank you!

@ColdNuudles
Copy link

Tons and lessons elsewhere, and this is the first time I am hearing this. Thank you!

@Abusaddik
Copy link

You are right thank you o here from you

@wareex
Copy link

wareex commented Mar 23, 2022

Okay

@Exzou
Copy link

Exzou commented Oct 6, 2022

mmmmm not really.

TL;DR

$ is a standard privilege user
# is root. No passwords or sudo needed.
The reason you often see a $ sign in an example is to show you which user you need to be in order for the script / command to work.
End TL:DR

Example 1: Q0h313th@pico-2019-shelll1:~$

The dollar sign in example 1 indicates you're running your commands as a standard user and need elevated permissions for certain commands. When you use sudo it is because you do not have root privileges. You use sudo to temporarily elevate your privileges and then enter the accounts password. if your account looked like:

Example 2: root@pico-2019-shelll1:~#

[notice the pound (often referred to as a hashtag in mainstream media now) verses the $ dollar sign] In example 2 you are now running as root. A command which previously needed sudo followed by your accounts password scan now be entered without sudo and it will run. This is obviously very dangerous, which is why the $ user and the need of sudo with a password following was set up.

A more accurate and concise answer can be found here:

https://stackoverflow.com/questions/35104339/what-does-the-mean-in-command-line-commands/48215530#48215530

@jmorgan28-01
Copy link

thanks @Exzou was wondering the difference between the '$' and the '#' on my kali linux shell but is root just like admin privileges?

@DevSuyashA
Copy link

Yes @jmorgan28-01. You're right.

@waregagbagbo
Copy link

Suppose

mmmmm not really.

TL;DR

$ is a standard privilege user # is root. No passwords or sudo needed. The reason you often see a $ sign in an example is to show you which user you need to be in order for the script / command to work. End TL:DR

Example 1: Q0h313th@pico-2019-shelll1:~$

The dollar sign in example 1 indicates you're running your commands as a standard user and need elevated permissions for certain commands. When you use sudo it is because you do not have root privileges. You use sudo to temporarily elevate your privileges and then enter the accounts password. if your account looked like:

Example 2: root@pico-2019-shelll1:~#

[notice the pound (often referred to as a hashtag in mainstream media now) verses the $ dollar sign] In example 2 you are now running as root. A command which previously needed sudo followed by your accounts password scan now be entered without sudo and it will run. This is obviously very dangerous, which is why the $ user and the need of sudo with a password following was set up.

A more accurate and concise answer can be found here:

https://stackoverflow.com/questions/35104339/what-does-the-mean-in-command-line-commands/48215530#48215530

@dgsm68
Copy link

dgsm68 commented Sep 2, 2023

gracias por la explicación más detallada

@FreeFelix
Copy link

That's all above comments it sounds like correct. But on my side I just reply that "$" as a shell prompt symbol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment