Raspberry Pi

3 Ways to Change Default Password on Raspberry Pi

Forgetting the main system password isn’t a good sign, especially if you want to unlock your system and need to do some urgent tasks. The good thing about the Raspberry Pi system is that it doesn’t require any password for initial login by default and you can enter the system without a password. However, when someone wants to access the Raspberry Pi device or when you are creating a database, you will surely need the default system password. If somehow you forget the password, you won’t be able to do these tasks.

In this article, you will find the ways to change your Raspberry Pi default password without needing to remember your previous password.

Change Default Password on Raspberry Pi

There are several ways to change a default password on your Raspberry Pi device, but here we will show you a few easiest ones among them that you can easily perform on your system. So, let’s begin discussing those ways.

1: Change Default Password on Raspberry Pi Through GUI

Changing the default password on Raspberry Pi through GUI is the most convenient option for Raspberry Pi users as through this method, you can change the default password for your Raspberry Pi device within a few seconds.

Simply go to your Raspberry Pi main menu and select the “Raspberry Pi Configuration” in the “Preferences” section.

After opening the Raspberry Pi configuration, click on the “Change Password” option.

Write in the new password in both sections as it appears on your “Change Password” window and then click on the “OK” button to confirm the password change.

2: Change Default Password on Raspberry Pi Through Terminal

Although changing the password through GUI looks promising for Raspberry Pi users, the above method doesn’t help you change the password on the Raspberry Pi lite version with no GUI. In that case, you are bound to use the Raspberry Pi terminal to change the forgotten password. To perform this process, you can execute the following command:

$ sudo passwd

Enter the new password in front of the “New password” section.

Enter the new password again to assure the password change.

This changed the previous password and updated it with the new one.

3: Change Default Password on Raspberry Pi Through Raspi-Config

You can also change the default password on your Raspberry Pi by opening the configuration option in the terminal through the following command:

$ sudo raspi-config

Go to the System Options and select the “Password” option.

Press enter on the next onscreen window as this will move you towards the change password option.

Enter your new password.

Type in the password again.

Once you enter the password again, you will see a confirmation screen that your password is changed successfully.

Conclusion

Changing the default password on Raspberry Pi is extremely useful, especially when you want to access your device remotely or work on different databases that need your default system password. There are multiple methods to do it; among them, the three easiest methods are already provided in this guideline. If you forgot your Raspberry Pi password, you can choose any method and change it to start doing tasks on your device.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.