If you really want to set a password for root, you can do it with sudo passwd
. Then, when you're in the terminal you can temporarily change to a root session with su
, and you can go back to your user session with exit
.
Regardless of how you start a root session, keep in mind the usual warnings. In a root terminal session you can really mess things up. That can be trivial, like creating folders in your home directory as root, using mkdir
, and then not being able to access them in your file manager, because you're an ordinary user there. (You can fix it with chown
in a root session.)
Or it could be more serious, even to the extent that you might have to reinstall your system, in a worst case. So be careful what you do there. But if you need to do a lot of maintenance requiring root permissions, such a session can be convenient, and if you're super careful, it's quite safe. It's your system, it's up to you to treat it well.
And for anyone who's not experienced using the command line--and you know who you are--I recommend that you read the above paragraphs again carefully before starting a root session in the terminal, or using commands or arguments that you're not familiar with.