The Raspberry Pi default password

The Raspberry Pi default password is:

raspberry

Read on to find out more about the default username, and default passwords in operating systems for the Raspberry Pi!

Raspberry Pi OS default password

We have written about Raspberry Pi OS before. It was previously known as Raspbian and is the default operating system which most users on the Raspberry Pi will use. (Read this article for an overview of operating systems on the Raspberry Pi).

On Raspberry Pi OS Desktop editions, the system will automatically log you in as user:

pi

The default user/password combination, therefore is:

user: pi
password: raspberry

Default password/user combination for Raspberry Pi OS

You do not have to enter the password, except in certain situations.

On the first system run, there is a helpful wizard which will suggest for you to change the password. If you intend to allow access to your Raspberry Pi using VNC or SSH, it is highly recommended to follow the wizard’s suggestion and change the password! Otherwise people will be able to log into your Pi on your local network.

Raspi Berry’s helpful tips for improved Raspberry Pi security

Note for German users

If “raspberry” does not work with a fresh Raspberry Pi OS installation, check that your keyboard settings are set up for the German layout.

The US keyboard switches the Z and Y keys. Therefore, if you need to log in using the wrong (US) keyboard layout, as a German user, you can try typing

raspberrz

If your keyboard layout settings do not match the actual physical keyboard, you should exercise extra care when changing a password – in this case you might change the password to something different than you intend to! We recommend to first change the keyboard layout, if possible, and test it.

Raspi berry’s helpful hints

Change password for user pi on Raspberry Pi OS

Open a terminal, and type:

passwd

You will be asked for your current password, and then to enter the new password twice.

Default password for root on Raspberry Pi OS

The user root is the omnipotent master administrator on your Raspberry Pi. root can do everything, even dangerous things which might break your Linux (Raspbian) installation. Therefore you need to use the root user with care, and only run commands which need the additional privileges.

By default, the root user has no password, but you can’t use it to log in. (Otherwise this would be a serious security problem!)

This isn’t a problem, because the user pi is part of the group sudo, which is allowed to run commands in a privileged way. As “pi” is the default user on Raspberry Pi OS, you’ll be able to run any command you need.

In order to set a password for the root user, therefore run the following command in a terminal to become root:

sudo su

Note: you can also run commands you would need to run as root by prepending them with sudo. For example: sudo ls to list a directory’s contents.

Raspi Berry’s helpful Raspberry Pi tips

Next, change the password. Again, type in:

passwd

This will ask you to enter the new password for root twice.

Ubuntu default password

This was tested on an Ubuntu 20.04.1 LTS installation (32 bit) on a Raspberry Pi 4.

If you install Ubuntu on the Raspberry Pi, the default user / password combination is:

user: ubuntu
password: ubuntu

Default password combination for Ubuntu on Raspberry Pi

You will be prompted immediately upon login to change the password (“You are required to change your password immediately (administrator enforced)”.

It will first ask you for your current password, which is ubuntu. Then it will ask you to enter the new password, and repeat the new password. After you’ve finished changing the password, you’ll finally be logged in.

Ubuntu default root password

Similar to Raspbian/Raspberry Pi OS (see above), Ubuntu does not have a default root password. The root account, by default, is locked in Ubuntu.

Use the same procedure with sudo (or sudo su) to run commands as root.

References / Further reading

1 Comments

  1. […] course, as we’ve written about before, the default username and passwords on Raspberry Pis are […]

Leave a Comment