Command not found $ (dollar sign)

Presumably you are copying and pasting commands from somewhere that look like this:

$ sudo apt update

The $ sign is not part of the command at all - it is a commonly used way to indicate that the text following it is a command. Typically here on Ask Ubuntu we use it when we want to indicate "I entered this command, and the output was this". It is an abbreviation of the full prompt we actually see:

zanna@monster:~$ $ sudo apt update
$: command not found

It can also be used to mean (on Ubuntu Forums for example) "run the command as a normal user", not root, because when you switch to root the prompt changes:

zanna@monster:~$ sudo -i
[sudo] password for zanna: 
root@monster:~#

The $ is not meant to be entered. The actual command would be

sudo apt update

$ is actually the prompt. It is not included at the start of any command. Try writing the command without $. Good luck..


Unless you are using the output of one command as an input variable of another e.g echo $(history) the use of $ should be avoided.Generally in bash scripting the character $ is used to delineate a variable.