Fastest, Simplest Way To Change Your Raspberry Pi Password
In today’s digital age, there are so many passwords to keep track of: there’s one for your phone, another one for your bank account, a third one for your emails, etc. Now, when you’re getting into Raspberry Pi, you’re also required to input a password.
Consequently, if you want to get a new password, you may be wondering: “How do you change your password in Raspberry Pi?”
The simplest and fastest way to change your Raspberry Pi is to go into your terminal on your Raspberry Pi and type in the command line: passwd. Then, the terminal will prompt you to create a new password and you’re done! On the other hand, if you’re logged in as a different user and want to change the password for a different user, you’ll need to type in the terminal: sudo passwd <user>.
If you’re still stuck, I go over 2 additional ways you can change your password in addition to providing pictures for the method I mentioned previously.
How To Change Your Raspberry Pi Password
Helpful Hint!
I’d highly recommend you use a long password that’s easy to remember. For instance, it could be a catchphrase or even your life’s motto.
If you don’t want to come up with one, then I’d recommend this website to help you generate an unbreakable password.
Lastly, if you want a simple system that will keep track of all your passwords for you, then I’d highly recommend LastPass to do all the hard work for you.
1. Using passwd In Terminal
This technique only works if you remember your current password.
Helpful Hint!
If you just started Raspberry Pi or if you didn’t change the password yet, Raspberry Pi automatically gives you a default password and username.
The username is pi and the password is raspberry.
Here are the simple steps you can change your password:
- Open up your terminal.
- To do this, you’ll need to click on your terminal icon. It’s usually located on the top left corner of your screen. It’s the fourth icon from the left, and the icon looks like a blackboard with the symbol “>_” in it.
- Type in the command line
passwd
Now, you’ll be prompted to type in your current password and the new password you want.
2. Using Raspberry Configuration
In case you forgot your password and you want to change it, here are the 4 simple steps to do that:
- Open up the application menu
- To find this go to the top left corner of your screen. It should be the first icon you see. It looks like a Raspberry Pi.
- Next, click on “Preferences” and open “Raspberry Pi Configuration”
- After that, a new window will open, and you’ll need to find the section “Change Password”. Click on it.
- Finally, you’ll be prompted to change your password.
3. Using raspi-config In Terminal
This is a similar method to the previous one I mentioned, but you will be solely working out of your terminal to change your password and it may require a few extra steps. Here are the 6 simple steps:
- Open up your terminal.
- To do this, you’ll need to click on your terminal icon. It’s usually located on the top left corner of your screen. It’s the fourth icon from the left, and the icon looks like a blackboard with the symbol “>_” in it.
- Type in the command line
sudo raspi-config
- Now, you should see a screen like the one below. Click on “System Options” (1). If you can’t use your mouse, you can move around with your arrow keys and “click” on an option using your enter key.
- Next, click on “S3 Password”
- After that, you will see a prompt. Press your enter key to confirm that you want to change your password.
- Then, you’ll be taken back to your terminal, and now you can enter your new password! Once again, you’ll need to be asked to type it twice for security reasons.
Congratulations! You’ve succeeded in changing your password! Now, you will see a “congratulation” prompt. You can exit by hitting the esc key.
How To Test Your Password
If you’re paranoid like me, you may have an insatiable urge to test out your new password and make sure it correct.
Here are some simple steps to do just that:
- Open up your terminal.
- To do this, you’ll need to click on your terminal icon. It’s usually located on the top left corner of your screen. It’s the fourth icon from the left, and the icon looks like a blackboard with the symbol “>_” in it.
- Type in the following code in the terminal:
su - pi
- Then, type in your password and hit enter to verify!
As you can see in the image above, if you type your password incorrectly, you’ll receive the error message: “su: Authentication failure”
On the other hand, if you typed it in correctly, you won’t see any message.
Summary – tl;dr (Too Long; Didn’t Read)
Here are some key points you need to keep in mind for the future:
- You can easily change your password if you open up your terminal and type in the command line: passwd.
- Do note that this method would only work if you remember your current password.
- Note: if you’re new to Raspberry Pi or haven’t changed your Raspberry Pi yet, the default password Raspberry Pi has set for you is: raspberry
- Do note that this method would only work if you remember your current password.
- The two other methods you can change your password are:
- By using raspi-config in your terminal
- By opening up Raspberry Pi Configuration in your applications menu and navigating towards the “Change Password” section
- You can always double check your work by going into your terminal and typing in:
- su – pi
- Note: if you typed your password correctly, you won’t get any messages
- However, if you typed it wrong, then you’ll receive an error message
- su – pi
As you can see, it’s not a secret how easy it is to change your Raspberry Pi password using this guide!