PS1='$ ' for commands run by the user, PS1='# ' for those run by root. sudo is run by the user so it should be '$ '.
... and to run a command as root, you need to use 'sudo' as a user. # command and $ sudo command are functionally the same.
PS1='$ ' for commands run by the user, PS1='# ' for those run by root. sudo is run by the user so it should be '$ '.
... and to run a command as root, you need to use 'sudo' as a user. # command and $ sudo command are functionally the same.