If your system came with root password not set, perhaps a minimal VM with key-based login, you can quickly set root password with these:
$ sudo -i # switch to root
$ passwd root # set root password
Don’t forget that password.
If your system came with root password not set, perhaps a minimal VM with key-based login, you can quickly set root password with these:
$ sudo -i # switch to root
$ passwd root # set root password
Don’t forget that password.