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:
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:
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:
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.