What do the $ and # symbols mean in the shell prompt?
$ means you're an ordinary user; # means you're root (the superuser). The single character is a built-in danger sign.
* Every field of the default prompt is information — the final character ($ vs #) is the built-in privilege danger sign. *
The prompt is the shell telling you who and where you are before you type. By long Unix convention the final character encodes privilege level, so you can tell at a glance how much damage a careless command could do:
[student@localhost ~]$ # normal user — limited to your own files
[root@localhost ~]# # root — can change/delete anything on the system
The rest of the default prompt is also information, not decoration:
[username@hostname directory]$
│ │ │ └── privilege marker ($ = user, # = root)
│ │ └── current directory (~ means your home)
│ └── which machine you're on
└── who you're logged in as
That hostname field is a genuine safety feature: when you have several SSH sessions open, it's the difference between deleting files on your laptop and deleting them on the production server.
Security tip: Treat a # prompt as "live wire." Root has no permission checks stopping it, and there's no undo — rm -rf on the wrong path as root is unrecoverable. This is exactly why the modern habit is to stay a normal user and prefix individual commands with sudo rather than living in a root shell.