I often find command line commands starting with dollar signs in instructions to install many things. For example to install Ruby in Ubuntu, the website says to use the following command:
$ sudo apt-get install ruby-full
What does the $
represent?
"$" - is just a sign of the shell prompt, means that shell is ready to accept commands, you can understand it as a separator after which, you can interact with a shell.
The system shell prompt That dollar sign means: we're in the system shell, i.e the program that you're put into as soon as you open the Terminal app. The dollar sign is often the symbol used to signify where you can begin typing in commands (you should see a blinking cursor there).
To be in command means to have control of something and to be in charge. The person who is in command is confident, knows what's going on, doesn't put up with any troublemaking from anyone else.
$ is not part of the command, it is just shown to illustrate terminal input. A full log of the guys entry would read something like
Dominic@stackoverflow$ sudo ap...
See the answer below https://stackoverflow.com/a/48215530/1117934, for a more complete explanation on the difference between $
and #
.
The $
is not part of the command. It's there to tell you that this command needs to be executed as a regular user.
When you prompt as a regular user (in bash shell at least), the line starts with the user name you're currently prompt as, followed by @
, followed by the machine hostname, followed by :
, followed by the current location, followed by $
.
It looks like this :
bob@work-station:~$
But, if you prompt as root, the last $
will be replaced by a #
:
root@work-station:~#
And that's the point of those tutorials :
$
, you know that the command should be executed as regular user. #
, it should be executed as root. Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With