In Linux-based systems such as Ubuntu 22.04, there is an account that is referred to as a root account. This account has access to all commands and resources present on the system and requires the user to set a password for this account. If you wish to change this password or, for some reason, have forgotten your existing password, then follow our post as we will guide you about changing passwords on Ubuntu 22.04 system.

How to change password on Ubuntu 22.04

Here, we have summed up all the required steps that will lead you to successfully change your password on Ubuntu 22.04. So, let’s start!

Step 1: OpenGrub Menu

If you wish to change your root account password, then you need to open the Grub menu on your Ubuntu 22.04. In order to do so, you need to first restart your system and then quickly press and hold the “Shift” key when the system is restarting:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/06/echo/change-password-ubuntu-22-04-01.png" data-lazy- height="702" src="data:image/svg xml,” width=”936″>

Step 2: Edit Grub Menu

Now you need to change the default boot entry of the system and for that press the “E” button on the keyboard. This will allow you to make changes to the GRUB menu:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/06/echo/change-password-ubuntu-22-04-02.png" data-lazy- height="702" src="data:image/svg xml,” width=”936″>

Once you are in the edit mode, bring your keyboard cursor to the line starting with the word “linux” using the arrow keys and write the following command at the end of that line:

Output

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/06/echo/change-password-ubuntu-22-04-03.png" data-lazy- height="702" src="data:image/svg xml,” width=”936″>

Now boot the system with the new configuration using Ctrl X, or F10.

Step 3: Check Access

After performing the above step, you will be given root access. Now ensure that you have read and write access to the file system where Ubuntu 22.04 is installed. To evaluate this, run this command:

Output

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/06/echo/change-password-ubuntu-22-04-04.png" data-lazy- height="522" src="data:image/svg xml,” width=”936″>

If you see the above-given output, then it means you have read and write access.

Step 4: Change Password

Now run the following command to change the password on your Ubuntu 22.04 system and enter the new password:

Output

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/06/echo/change-password-ubuntu-22-04-05.png" data-lazy- height="124" src="data:image/svg xml,” width=”936″>

However, if you wish to change the password for another user account rather than the root account, then utilize the command and specify the “username” in it:

Step 5: Reboot system

Now reboot the Ubuntu 22.04 system using the below-mentioned command and press Enter to log in with the new password:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/06/echo/change-password-ubuntu-22-04-06.png" data-lazy- height="114" src="data:image/svg xml,” width=”936″>

That was all about changing the password on Ubuntu 22.04. Give it a try on your system.

Conclusion

In order to change the password on Ubuntu 22.04, you need to open the Grub menu and edit this menu by pressing the “E” key. Once in the edit mode, make the specified configurations. After saving them, evaluate whether you have read and write access to the file system or not and change your password using the system password with the “passwd” command and reboot the system to log in with the new password. This post discussed the method to change passwords on Ubuntu 22.04 system.

About the author

<img alt="" data-lazy-src="https://secure.gravatar.com/avatar/c73b74cd8044d2e9b300610f5af77d0b?s=112&r=g" data-lazy- height="112" src="data:image/svg xml,” width=”112″>

Sharqa Hameed

I am a Linux enthusiast, I love to read Every Linux blog on the internet. I hold masters degree in computer science and am passionate about learning and teaching.