How to change root password in Ubuntu[Terminal and GUI Method]

Endrit Qerreti

Endrit Qerreti

In this tutorial, you will learn how to change the password of your root in your Ubuntu machine.

In ubuntu and any other linux distro, changing the root password is quite simple, and it can be done via GUI, but also via the terminal.

In this tutorial, we'll change root password via two different methods. In the first method, we'll change the root password via GUI.

In the second method, we'll change root password by using passwd command in the terminal.

Method 1: Change root password in Ubuntu using GUI

To change the password of your root user on Ubuntu by using GUI, simply follow the steps below.

1) Click to "Activities" to open the Activities overview window.

2) Search for "Settings" in the search box.

3) Click to Settings icon to go to the Settings window

You will be taken to the Settings window as shown in the screenshot below. In this window, you need to go to "Users" section, simply click Users button which is located at the left.

4) Change password

Once you are in the Users window, you can now proceed to change the password of the root.

To do so, first select the root user

For example, our root user is owlhowto

And then click to "Password" box

Next, proceed to change the password. To do so, first you need to enter the current password of the root user, then enter the password on both password fields as shown in the screenshot below.

Once you are done, click to "Change" button to set the new password.

Method 2: Change root password on Ubuntu via terminal

To change root password by using the terminal on your Ubuntu machine, you can easily do so by using the passwd command.

sudo passwd root

Next, proceed to authenticate by entering sudo password

Next, you will be asked to enter a password for the user root, proceed to enter a password and press enter, you will be asked to enter your password twice in order to confirm so make sure to enter the same password in both prompts, then simply press enter.

Next, you should see the following message in your terminal, which means now you are good to go and login to your root user using the password you entered.


In this tutorial, you learned how to change the password of your root account in Ubuntu, via two different methods, by using GUI and terminal.

Now you should be able to use your password to login to your root user.