Write Raspberry Pi OS to an SD Card

The fastest way to write Raspberry Pi OS (or any other Pi-compatible image) to an SD card is the official Raspberry Pi Imager. It downloads, writes, and verifies the image in one step — and on recent versions can also pre-configure SSH, WiFi, hostname, and a user account before the first boot.

Install Raspberry Pi Imager

Download from the official site: https://www.raspberrypi.com/software/

Available for Windows, macOS, Linux (apt, snap, AppImage) and Chromebook.

Write the image

  1. Insert your SD card via a USB reader or built-in slot.
  2. Open Raspberry Pi Imager.
  3. Click Choose Device — pick your Pi model (Pi 4, Pi 5, Zero 2 W, etc.). The OS list will filter to compatible options.
  4. Click Choose OS — the typical pick is Raspberry Pi OS (64-bit). Other options include Pi OS Lite (no desktop), Ubuntu, LibreELEC, RetroPie, and Use custom for a local .img file.
  5. Click Choose Storage — select your SD card. Double-check the size before proceeding.
  6. Click NextEdit Settings to pre-configure the OS (recommended — see below), or No to write a vanilla image.
  7. Confirm — Imager will erase the card and write the image. Takes 2–10 minutes depending on card speed.

When done, eject and insert into your Pi.

Before clicking Write, open the OS Customisation dialog. This is the modern equivalent of the old “drop an ssh file on the boot partition” trick — it sets everything up declaratively.

Setting What it does
Hostname Network name (e.g. mypi.local)
Username + password Default user account (Bookworm removed the old pi / raspberry defaults)
WiFi SSID + password + country Auto-connect on first boot
Locale + timezone + keyboard Sane defaults for your region
Enable SSH Password or public-key authentication

The dialog is also reachable via Ctrl+Shift+X in older Imager versions.

The Imager writes a firstrun.sh to the boot partition that runs once on first boot to apply these settings.

Alternative tools

  • balenaEtcher — cross-platform GUI for writing images. Useful if you already use it for other boards. No pre-configuration features.
  • dd (Linux/macOS) — direct command-line write. Fast, no UI:
  sudo dd if=raspios.img of=/dev/sdX bs=4M status=progress conv=fsync
  

Triple-check /dev/sdX — picking the wrong device wipes your main drive.

  • Win32 Disk Imager — legacy Windows option. Imager has fully replaced its use cases.

Next step

For headless setup (no monitor or keyboard), see Raspberry Pi Headless Setup.