When you see a command prefaced by a $ or a #, the symbols are informational. They tell you whether or not you need to have root privileges to run the command.
$ - command is run by your user (no sudo)
# - command is run by root (sudo is needed)
The symbols represent either a normal unprivileged user’s terminal prompt ($), or a root-privileged terminal prompt (#).
You do not enter the symbols into the terminal.