First, reboot or power on your CentOS 8 system. Select the kernel that you want to boot into. Next, press
‘e’ to interrupt the boot process and make changes.
Replace the kernel parameter
rw and append an extra kernel parameter
Press Ctrl+x combination on the keyboard to enter single-user mode.
Next, run the command below to mount the root file system in read and write mode.
You can now change the root password by executing the command:
To apply the changes, exit and reboot the CentOS 8 system.