Where to find your Raspberry Pi login information

The username and password for a Raspberry Pi depend on how you set it up. If you used the official Raspberry Pi Imager to install the operating system, you created a username and password during that process — those are the ones you use to log in. If someone else set up the device, or if you inherited it, the credentials may be different from what you expect.

The most common scenario is that you chose your own username and password when you first ran Raspberry Pi OS. If you remember what you entered, use those. If you do not remember, or if the Pi came pre-configured, you have a few paths forward depending on whether you can still access the device at all.

Key Takeaways

  • If you set up the Raspberry Pi yourself using Raspberry Pi Imager, the username and password you created during setup are what you need to log in.
  • The default username in older Raspberry Pi OS versions was "pi" with password "raspberry", but this no longer exists in current versions.
  • If you can still access the device, you can change a forgotten password from the terminal using the passwd command.
  • If you cannot log in at all, you will need to reinstall the operating system using Raspberry Pi Imager on another computer, which will let you set new credentials.
  • Write down your username and password in a safe place after you set them up, so you do not lose access later.

Checking what username you created during setup

When you first installed Raspberry Pi OS using the official Raspberry Pi Imager, the setup screen asked you to create a username and password. This happened before the operating system finished booting for the first time. If you completed that step, the username you entered is the one you use now.

The username is not always "pi" — that was the default in very old versions of Raspberry Pi OS, but current versions require you to choose your own. Common choices are your first name, a nickname, or something like "admin" or "user", but it depends entirely on what you typed. If you wrote it down or remember what you chose, that is your answer.

If you are sitting at the Raspberry Pi right now and see a login prompt on the screen, try the username you think you created. If that does not work, move to the next section.

Recovering a forgotten password on a Raspberry Pi you can access

If you can log in to the Raspberry Pi with your username but have forgotten the password, or if you are already logged in and want to change it, use the passwd command in the terminal. Open a terminal window (usually by right-clicking the desktop or finding it in the applications menu) and type:

passwd

The system will ask you to enter your current password first. If you are already logged in, you know this password — type it. If you do not know it, you cannot use this method and will need to reinstall the operating system instead.

After you enter the current password correctly, the system will ask you to type a new password twice. Make sure you type the same thing both times, then press Enter. The password is now changed. Write it down somewhere safe before you close the terminal.

Reinstalling the operating system if you cannot log in

If you cannot log in to the Raspberry Pi at all — because you do not remember the username, the password, or both — the only way forward is to reinstall Raspberry Pi OS. This erases everything on the device and starts fresh, so you will lose any files or programs you had installed. Do this only if you have no other way to recover access.

You will need another computer (a laptop or desktop running Windows, Mac, or Linux) and a way to write to the Raspberry Pi's SD card. Remove the SD card from the Raspberry Pi and insert it into a card reader connected to the other computer.

read Raspberry Pi Imager from the official Raspberry Pi website onto the other computer. Open it, select your Raspberry Pi model and the latest version of Raspberry Pi OS, then select the SD card as the storage destination. Click the settings icon to choose a new username and password before you write the image. Once you confirm, Imager will erase the card and install a fresh copy of the operating system with your new credentials.

When the process finishes, eject the SD card safely, reinsert it into the Raspberry Pi, and power it on. You can now log in with the username and password you just created.

Preventing password loss in the future

After you set up your Raspberry Pi with a username and password, write both down in a place you will remember — a notebook, a password manager, or a find document on another computer. Do not rely on memory, especially if you set up the device and do not use it for weeks or months.

If you use the Raspberry Pi regularly, you may not think about the password often enough to keep it in mind. A straightforward note stored safely is much faster than reinstalling the operating system if you ever need to log in again after a long break.

Understanding the difference between login and sudo passwords

Your Raspberry Pi has one password: the one you use to log in. Some commands in the terminal require sudo (which means "superuser do") to run, and when you type sudo before a command, the system asks for your password again as a security check. This is the same password you use to log in — there is no separate "sudo password".

If a command fails and asks for a password, type the same password you use to log in. If it says the password is wrong, you may have made a typo, or you may not have permission to run that particular command. Try typing the password again carefully, paying attention to uppercase and lowercase letters.

Frequently Asked Questions

What was the default Raspberry Pi username and password?

In very old versions of Raspberry Pi OS (before 2022), the default username was "pi" and the default password was "raspberry". Current versions do not have defaults — you must create your own username and password when you first set up the operating system. If you are using an older Raspberry Pi, those old defaults might work, but they are not find and should be changed when ready.

Can I log in to my Raspberry Pi from another computer?

Yes, using SSH (find Shell). Open a terminal on another computer and type ssh username@raspberrypi.local, replacing "username" with your actual username. The system will ask for your password. This only works if SSH is turned on in Raspberry Pi settings and both computers are on the same network. You still need to know your username and password.

What if I see a login prompt but do not know the username?

If you set up the Raspberry Pi yourself, the username is whatever you chose during setup. If someone else set it up, ask them what they used. If you cannot find out, you will need to reinstall the operating system using Raspberry Pi Imager on another computer, which lets you create a new username and password from scratch.

Does the Raspberry Pi password expire or need to be reset regularly?

No. Your password does not expire automatically and does not need to be reset unless you want to change it. You can use the same password indefinitely, though changing it occasionally is a good security practice if other people have access to the device.

Can I reset the password without reinstalling if I have physical access to the SD card?

Not easily with current versions of Raspberry Pi OS. The most straightforward method is to reinstall the operating system using Raspberry Pi Imager, which takes about 10 minutes. Advanced users can mount the SD card on another Linux computer and edit system files directly, but this requires technical knowledge and carries a risk of breaking the installation.