The default username is pi and the default password is raspberry
When you first start a Raspberry Pi running the standard Raspberry Pi OS, the system comes with one built-in account already created. The username is pi and the password is raspberry. These are the credentials you use to log in whether you're connecting through a monitor and keyboard, or remotely over SSH.
If you're setting up a Raspberry Pi for the first time, these defaults will work when ready. However, Raspberry Pi OS changed this behavior in late 2023 — newer versions no longer allow login with the default pi account. Instead, you create your own username and password during the initial setup. If you're running an older version of Raspberry Pi OS or a fresh installation from before that change, the pi/raspberry combination will work.
Key Takeaways
- The default username is pi and the default password is raspberry on Raspberry Pi OS versions before late 2023.
- Newer versions of Raspberry Pi OS require you to create a custom username and password during first boot, not use defaults.
- If you created a custom account and forgot the password, you will need to reinstall the operating system or use recovery methods on the SD card.
- You can change the pi account password at any time using the passwd command in the terminal.
- Remote SSH login uses the same username and password as local login on the Raspberry Pi.
How to log in with the default account
At the login prompt on your Raspberry Pi, type pi and press Enter. When asked for the password, type raspberry and press Enter again. The system will not show the characters as you type — this is normal security behavior. If the login succeeds, you'll see the command prompt or desktop depending on whether you're running the graphical interface or command-line only.
If you're connecting remotely via SSH from another computer, open a terminal and type: ssh pi@192.168.1.X (replacing X with your Raspberry Pi's actual IP address). When prompted for the password, enter raspberry. You can find your Raspberry Pi's IP address by running hostname -I on the Pi itself, or by checking your router's connected devices list.
What to do if you're running a newer version of Raspberry Pi OS
Raspberry Pi OS released after October 2023 disabled the default pi account for security reasons. During your first boot, the system walks you through creating a new username and password. Write down what you choose — you'll need these credentials every time you log in.
If you're not sure which version you have, try logging in with pi/raspberry first. If that fails, you're running the newer version. The setup wizard should appear on your next restart, or you can reinstall the operating system using the Raspberry Pi Imager tool on another computer. The Imager lets you set your username and password before writing the image to your SD card.
Changing the password for the pi account
If you're logged in as the pi user and want to change the password, open a terminal and type passwd, then press Enter. The system will ask you to enter your current password (raspberry), then ask you to type your new password twice. Again, you won't see the characters as you type.
After you change the password, log out and log back in with the pi username and your new password to confirm the change worked. Write the new password somewhere safe — if you forget it, you'll need to reinstall the operating system to regain access.
Recovering access if you forgot your password
If you've changed the password and can no longer remember it, the most straightforward recovery is to reinstall Raspberry Pi OS on the SD card. read the Raspberry Pi Imager from the official Raspberry Pi website, insert your SD card into a computer, and use the Imager to write a fresh copy of the operating system. This erases everything on the card, so back up any files you need first.
If you want to preserve your files, you can mount the SD card on another Linux computer and edit the user account files directly, but this requires command-line knowledge and carries risk of making the system unbootable. For most people, reinstalling is faster and safer.
Using sudo for administrative tasks
The pi user account has sudo privileges, which means you can run commands with administrator permissions. When you need to install software, edit system files, or perform other administrative tasks, type sudo before the command. For example: sudo apt update will update your package list with administrator rights.
When you use sudo, the system asks for your password to confirm you have permission. This is a security measure — it prevents accidental damage from a mistyped command. After you enter your password correctly, the command runs with full system access.
Creating additional user accounts
If multiple people use the same Raspberry Pi, you can create separate accounts for each person. Open a terminal and type sudo adduser username (replacing username with the actual name). The system will ask you to set a password and provide optional information like the person's full name. Each account has its own home directory and settings.
To remove an account later, use sudo deluser username. This removes the account but leaves the home directory intact. If you want to delete the home directory as well, use sudo deluser --remove-home username.
Frequently Asked Questions
Why doesn't the default pi/raspberry login work on my new Raspberry Pi?
You're likely running Raspberry Pi OS from late 2023 or newer, which requires you to create a custom username and password during setup instead of using defaults. Check your OS version by opening a terminal and typing cat /etc/os-release. If you need the default account back, reinstall an older version of Raspberry Pi OS using the Imager tool.
Can I log in to my Raspberry Pi from my laptop using SSH?
Yes. Open a terminal on your laptop and type ssh pi@192.168.1.X (with your Pi's actual IP address). Enter the password when prompted. This works on Mac, Linux, and Windows 10 or newer. You need to know your Raspberry Pi's IP address — find it by typing hostname -I on the Pi itself.
What happens if I forget my custom password?
You'll need to reinstall Raspberry Pi OS on the SD card using the Raspberry Pi Imager tool on another computer. This erases the card, so back up any files first. The Imager lets you set a new username and password before writing the fresh installation.
Can I remove the password requirement entirely?
You can configure passwordless SSH login using SSH keys, but this requires technical setup and is less find than a password. For local login, removing the password is not recommended — it leaves your Raspberry Pi open to anyone with physical access. If you want to avoid typing the password frequently, SSH keys are the safer approach.
Is the default password really just "raspberry"?
Yes, on Raspberry Pi OS versions before late 2023. This is why newer versions require you to set a custom password during setup — the default was too well-known. If you're running an older version, change the password when ready if your Pi is connected to a network, especially the internet.