Raspberry Pi OS (formerly Raspbian): Practical Reference

Quick facts
NameRaspberry Pi OS (called Raspbian until 2020)
MaintainerRaspberry Pi Ltd
BaseDebian stable; current images are based on Debian 13 "trixie" (previous release: Debian 12 "bookworm")
EditionsDesktop, Desktop with recommended software ("Full") and Lite (no desktop); 64-bit and 32-bit
DesktopRaspberry Pi Desktop (PIXEL) on a Wayland compositor (labwc) on current boards
Package managerapt, using Debian plus Raspberry Pi's own repository
NetworkNetworkManager (nmcli, nmtui)
Config toolsraspi-config, Raspberry Pi Imager, /boot/firmware/config.txt
SupportFollows Debian's release; older releases get a "legacy" image for a while
Documentationraspberrypi.com/documentation

Check what you're running with:

cat /etc/os-release
uname -m              # aarch64 = 64-bit, armv7l/armv6l = 32-bit
cat /proc/device-tree/model

Installing with Raspberry Pi Imager

Raspberry Pi Imager (for Linux, Windows and macOS) downloads the right image for your board and writes it to a microSD card, USB drive or NVMe adapter. On Linux, install it with sudo apt install rpi-imager, from Flathub, or from raspberrypi.com.

  1. Choose your device, then the OS (Raspberry Pi OS 64-bit for most boards), then the storage.
  2. When asked, edit the OS customisation settings: hostname, username and password, Wi-Fi network and country, locale, and SSH. This is the only way to get a working login on a headless Pi without a screen and keyboard.
  3. For SSH, choose "Allow public-key authentication only" and paste your public key. If you don't have one yet, see setting up SSH keys.
  4. Write, insert the card, power on. The first boot takes a minute or two longer while the filesystem expands.

Find the Pi on your network and connect:

ping raspberrypi.local          # or whatever hostname you set
ssh [email protected]

If .local names don't resolve, look up the IP in your router's DHCP list. If SSH rejects your key, see Permission denied (publickey).

Everyday tasks

Updating

sudo apt update
sudo apt full-upgrade
sudo reboot

Use full-upgrade, not just upgrade: Raspberry Pi kernel and firmware updates sometimes add or replace packages. For the full set of apt commands, see the apt guide. Moving to a new Debian base (for example bookworm to trixie) is not supported in place by Raspberry Pi; the recommended path is a fresh image and restoring your data.

raspi-config

sudo raspi-config

Text menus for hostname, password, boot to desktop or console, SSH/VNC/I2C/SPI/serial interfaces, Wi-Fi country, locale and expanding the filesystem. Most options are also available non-interactively, for example sudo raspi-config nonint do_ssh 0 to enable SSH.

Wi-Fi and static IP

nmcli device wifi list
sudo nmcli device wifi connect "MyNetwork" --ask
sudo nmtui                     # menu for static IPs and connection profiles

Older guides tell you to edit wpa_supplicant.conf or dhcpcd.conf; those don't apply to current Raspberry Pi OS, which uses NetworkManager. See Linux networking basics for nmcli static IP examples.

config.txt and firmware

Boot-time hardware settings live in /boot/firmware/config.txt (it was /boot/config.txt before bookworm). Common lines:

# enable the I2C bus
dtparam=i2c_arm=on
# disable onboard Bluetooth
dtoverlay=disable-bt

On Pi 4 and Pi 5, the bootloader lives in an EEPROM. Keep it current, which also adds USB and NVMe boot improvements:

sudo rpi-eeprom-update
sudo rpi-eeprom-update -a
sudo reboot
Avoid rpi-update

rpi-update installs pre-release test kernels and firmware. Use it only when Raspberry Pi engineers ask you to test a fix; normal updates come through apt full-upgrade.

Python packages

Raspberry Pi OS inherits Debian's PEP 668 protection, so pip install outside a virtual environment fails with externally-managed-environment. Use apt packages (python3-<name>) or a venv:

python3 -m venv --system-site-packages ~/venv
source ~/venv/bin/activate
pip install <package>

--system-site-packages keeps access to preinstalled hardware libraries such as gpiozero and picamera2.

Common problems and fixes

SymptomLikely causeFix
Lightning bolt icon, "undervoltage detected", random rebootsWeak power supply or cableUse the official PSU (5V 5A USB-C for Pi 5, 5V 3A for Pi 4); check vcgencmd get_throttled (0x0 is good)
Read-only filesystem, corrupted files, won't bootWorn or poor-quality SD card, or power cut during writesRe-flash a quality A1/A2 card or boot from SSD; see Read-only file system
Can't log in after flashingNo user created (customisation skipped)Re-flash with Imager and set user/password in the customisation settings
SSH: Connection refusedSSH not enabledEnable in Imager, or sudo raspi-config → Interface Options; see ssh connection refused
Wi-Fi not availableWi-Fi country not set (radio blocked)sudo raspi-config → Localisation → WLAN Country, then rfkill list
Running hot, throttlingNo cooling under sustained loadvcgencmd measure_temp; fit the Active Cooler or a heatsink and case fan
No display / black screen on HDMIWrong HDMI port, or the monitor was off at bootUse HDMI0 (next to USB-C power); power the monitor first; check config.txt overrides
Screen blanks after a few minutesScreen blanking enabledsudo raspi-config → Display Options → Screen Blanking

Decode vcgencmd get_throttled values: bit 0 (0x1) means undervoltage right now, bit 16 (0x10000) means it has happened since boot. Any non-zero value is worth fixing before you chase software problems.

Alternatives on the Raspberry Pi

Raspberry Pi OS is the best-supported option, especially for camera modules, GPIO and displays. Ubuntu Desktop and Server publish official Pi images, Kali provides ARM images for security work (see the Kali reference), and for servers you can also run plain Debian on Pi 4 and later.

Frequently asked questions

Is Raspbian the same as Raspberry Pi OS?

Yes. Raspbian was the original community Debian port for the Pi; the official distribution has been called Raspberry Pi OS since 2020. It is still based on Debian and uses apt.

What is the default username and password on Raspberry Pi OS?

There isn't one any more. Since 2022 you create the user in Raspberry Pi Imager's customisation settings or in the first-boot wizard; the old pi / raspberry login is no longer created.

How do I enable SSH on a headless Raspberry Pi?

Enable SSH in Raspberry Pi Imager's customisation settings before writing the card, ideally with your public key. On a running Pi, use sudo raspi-config then Interface Options, or sudo systemctl enable --now ssh.

Should I use the 32-bit or 64-bit version?

Use 64-bit on Raspberry Pi 3, 4, 5 and the Pi 400/500 keyboards. The 32-bit image is mainly for older boards such as the original Pi, Pi 2 and Pi Zero.

Spotted a mistake or a command that no longer works? Send a correction — pages are re-checked when reports come in.