How to Change the Root Password in Linux Mint 20

Occasionally, we have so many things on our minds that we might forget the password of a social network or even a system user. That’s why today, I will help you to change the root password in Linux Mint 20. The procedure is easier than you think.

Enabling grub in Linux Mint

If you have Linux Mint installed only on a single disk, then you probably don’t see the grub, but the system boots directly. This is a problem because we need this menu to complete this tutorial.

**Note: for this post, we have to be careful with the editing of the grub file. Doing it wrong can cause serious issues that are difficult to solve **.

So edit the grub configuration file on the system

sudo nano /etc/default/grub

And change the line

GRUB_TIMEOUT_STYLE=hidden

to this one

GRUB_TIMEOUT_STYLE=menu

Moreover, if you find a line similar to this one

GRUB_HIDDEN_TIMEOUT=0

You have to comment it out by placing a # at the beginning. As follows:

#GRUB_HIDDEN_TIMEOUT=0

Save the changes and close the editor.

To regenerate the grub configuration, just run the following command

sudo update-grub

After rebooting the computer, you will be able to see the grub of your system.

Change root password in Linux Mint 20

Now, once you are looking at the grub, you have to access the system’s recovery mode.

Then, you will see a screen like this one

Grub screen
Grub screen

There, you have to enter the option to deploy a terminal as root user.

Getting a console to change the root password on Linux Mint 20
Getting a console to change the root password on Linux Mint 20

Once the terminal is deployed as root user, you have to run this command to give permissions to the file system

mount -o rw,remount /

Thereafter, you can change the root user’s password using the command

passwd root

And there you can change it to whatever you want.

Then, synchronize the change and finally reboot the system.

sync
reboot

You can now access your system normally.

Conclusion

Forgetting the root password is more common than it seems because a regular user usually doesn’t use it daily. However, in this post, we have helped you to reset it in Linux Mint. This post should work on any version of this great operating system.

I hope you liked this post and help us to spread it, so it can grow.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top