Raspberry Pi

How to Change the Password on Raspberry Pi

A password on Raspberry Pi is a string that is used for the authentication purpose to secure the operating system so it cannot be accessed by unauthorized users and the data in the operating system remain secure. The Raspberry Pi operating system allows creating multiple user accounts and every user can secure their account by applying the password on it.

Sometimes the users want to change their account passwords, so in this write-up, we will explore the methods by which we can change the password of the Raspberry Pi operating system.

How to change the Raspberry Pi password

There are three methods to change the password on Raspberry Pi:

  • By using the passwd command in terminal
  • By using the raspi-config command in terminal
  • Through graphical user interface (GUI) method

Method 1: By using the passwd command in terminal

We can change the password of the user account by executing the command mentioned below:

$ passed

It will ask you to enter the “Current password”, in order to confirm that the authorized person of the account is trying to change the password, so type the current password:

Now it will ask you to enter the new password which you want to set and then to type it again for confirmation:

The password has been successfully changed.

Method 2: By using the raspi-config command in terminal

Another command to change the password is to open the configuration settings of the Raspberry pi by using the command:

$ sudo raspi-config

A menu will open, choose the “System Options” and press the “Enter” key:

Another menu will be displayed, choose the “S3 Password” and press the “Return” key:

A notification will appear as shown in the image below, press “Enter”:

It will ask you to enter the new password for the user account and then to retype the password:

The password has successfully changed.

Method 3: Through graphical user interface (GUI) method

The beginners who are using the Raspberry Pi for the first time, for them, the convenient method to change the password is through the graphical user interface, for this purpose, click on the left-most corner of the desktop screen of Raspberry Pi OS, a dropdown menu will appear, select “Preferences” and then click on the “Raspberry Pi Configuration”:

A window will open, click on the “System” tab, and then “Change Password”:

A option will be open to enter a new password and retype the password for confirmation:

The password has been changed, click on the “OK” button:

Conclusion

The password on Raspberry Pi is a combination of the characters which form a string, and this string is used to secure the user account. It is recommended that a strong password must contain the numeric, alphabet, and special characters and also change the password after every two weeks so that it will be difficult for the unauthorized user to hack the password. In this write-up, we have explored three different methods (two of CLI and one of GUI) to change the password of the user account of the Raspberry Pi operating system.

About the author

Hammad Zahid

I'm an Engineering graduate and my passion for IT has brought me to Linux. Now here I'm learning and sharing my knowledge with the world.