Raspberry Pi Installing the OS
Installing Raspberry Pi OS onto a microSD card with Raspberry Pi Imager is the first hands-on step before your Pi can boot up.
What You Need Before Flashing
- A microSD card, 8GB minimum, 32GB or larger recommended for the desktop variant
- A card reader, either built into your computer or a small USB adapter
- Another computer with internet access to download the imaging tool and OS
- The Raspberry Pi Imager application, the official tool for writing operating system images to a card
Raspberry Pi OS Variants
Raspberry Pi OS is the official operating system, built on Debian Linux and tuned to run well on Raspberry Pi hardware. It comes in a few flavors depending on how much you want pre-installed. Raspberry Pi Imager also offers other operating systems entirely, from Ubuntu to media-center and retro-gaming distributions, listed under an "Other general-purpose OS" category, but Raspberry Pi OS is the default starting point for most projects and the one this course focuses on.
Using Raspberry Pi Imager
- Download and install Raspberry Pi Imager on any computer (Windows, macOS, or Linux)
- Insert the microSD card using a card reader
- Open Imager and click "Choose Device" to select your Raspberry Pi model
- Click "Choose OS" and select Raspberry Pi OS or another listed option
- Click "Choose Storage" and select the microSD card, double-checking it's the right drive
- Click the gear/settings icon to open advanced options before writing, if you want to preconfigure the Pi
- Click "Write" and confirm, which erases the card and writes the new image
Flashing From the Command Line (Advanced)
# List attached disks to find the SD card device (double-check the name!)
diskutil list # macOS
lsblk # Linux
# Unmount the card first, then write the downloaded image with dd
sudo dd if=raspios-bookworm-arm64.img of=/dev/sdX bs=4M status=progress conv=fsync
# Flush all buffers before removing the card
syncPreconfiguring With Advanced Options
Before clicking Write, the gear icon (or Ctrl+Shift+X) in Raspberry Pi Imager opens an advanced options panel. Here you can set a hostname, create a username and password, connect to a specific Wi-Fi network, choose your locale and keyboard layout, and enable SSH ahead of time. Filling these in before the card is even written means a Pi can boot straight onto your network with remote access already available, which is especially useful when there's no spare monitor or keyboard nearby.