Home Raspberry Pi OS How to change Raspberry Pi password

How to change Raspberry Pi password

by Arun Kumar
change raspberry pi password

When you first install Raspbian (the official Raspberry Pi Operating System), you will notice it comes with a default username “pi” and password “raspberry.” This user “pi” is a sudoer – meaning he has overall access to the system and can even execute commands that require root privileges.

Changing the Raspberry Pi Password

For security reasons, it is therefore recommended you change this default password. In this post, we will look at two methods that you can use to perform this action.

  1. Using the raspi-config window
  2. Using the passwd command

Method 1: Change password using raspi-config

I highly recommend this method to users who have access to their Raspberry Pi over SSH. However, you can still use it on the Raspberry Pi desktop user interface.

Follow the steps below:

Step 1: Execute the command sudo raspi-config on the Raspberry terminal or the tool you are using for SSH access (e.g., Putty).

sudo raspi-config

That will open the Raspberry Pi Software Configuration Tool.
Step 2: Select the option “System options: Configure System Settings.”

system options

System options

Step 3: On the next screen, select “Password Change passwoord for pi user.”

password

Password

Step 4: On the next screen, you will see a notification that you will be prompted to enter a new password.

prompt to new password

Prompt to new password

On the Terminal window, you will see a prompt to type the new password. Type your new password.

Note: Linux system doesn’t show your password as you type. Not either by dots or Asterix. Therefore, type your password and hit Enter.

You will see a prompt to Retype your password for confirmation. Type the password again and hit Enter.

type new password

Type new password

That’s it! You have successfully changed the password on your Raspberry Pi.

If you are running another distro other than Raspbian, you can use the second method below.

Method 2: Change password using the passwd command

Step 1: Launch the Terminal and run the command below:

sudo passwd

You will get a prompt to type your new password—hit Enter.

Note: Linux system doesn’t show your password as you type. Not either by dots or Asterix. Therefore, type your password and hit Enter.

You will be prompted to Retype the password. Once done, hit Enter.

passwd command

passwd command

That’s it! You have successfully changed the password on your Raspberry Pi.

You may also like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.