How to Set Up Your First Raspberry Pi

Last updated September 2026. Some links on this page may be affiliate links, which means RPi4U may earn a small commission at no extra cost to you.

By the end of this guide you will have a Raspberry Pi running the latest Raspberry Pi OS, connected to your Wi-Fi, fully updated, and reachable from your Windows PC or Mac over SSH. No keyboard or monitor required.

Every other project on this site starts from this point, so it pays to get it right once. The current release of Raspberry Pi OS is based on Debian 13 “Trixie”, and the flashing tool, Raspberry Pi Imager, was redesigned in version 2.0, so older guides will look different.

At a glance

DifficultyBeginner
Time45 minutes
Works onPi 5 · Pi 4 · Zero 2 W
Parts cost (approx, US)~$150 for a Pi 5 4GB kit (board, power supply, case, microSD card, cable)

What you need

  • A Raspberry Pi board (this guide uses a Pi 5 with 4GB of RAM)
  • The right power supply: the official 27W USB-C supply for a Pi 5, a 15W USB-C supply for a Pi 4, or a micro-USB supply for a Zero 2 W
  • A microSD card, ideally 32GB or larger (8GB is the minimum for the Lite version)
  • A case, so the board is not sitting bare on your desk
  • A computer (Windows, Mac or Linux) with an SD card reader, for flashing the card
  • Your Wi-Fi name and password, or an Ethernet cable to your router
  • Optional: a monitor, a micro-HDMI to HDMI cable (mini-HDMI for the Zero 2 W), and a USB keyboard and mouse if you want to use the desktop directly

Not sure which board to buy? Our Which Pi should I get? picker gives you an answer in a few clicks. The short version: a Pi 5 for a desktop or anything demanding, a Pi 4 if you already own one, and a Zero 2 W for small, low-power jobs.

Step 1: Pick desktop or Lite

Raspberry Pi OS comes in three 64-bit flavors. Decide now, because you choose it while flashing.

  • Raspberry Pi OS (with desktop): a full graphical desktop. Pick this if you plan to use a monitor, or you are not sure yet.
  • Raspberry Pi OS Lite: no desktop, command line only. Pick this for servers such as Pi-hole or Jellyfin that you will manage over SSH. It uses less memory and is the better fit for a Zero 2 W.
  • Raspberry Pi OS Full: the desktop plus a bundle of extra apps. Most people do not need it.

Step 2: Flash the card with Raspberry Pi Imager

Download Raspberry Pi Imager for your computer from raspberrypi.com/software and install it. Put your microSD card in the card reader, then open Imager. Version 2.x walks you through a series of full-window steps.

  1. Device: select your exact board, for example Raspberry Pi 5. This filters the OS list to images that will boot on it.
  2. OS: choose Raspberry Pi OS (64-bit) for the desktop, or find Raspberry Pi OS Lite (64-bit) in the list for a headless setup.
  3. Storage: pick your microSD card. Leave the option to exclude system drives switched on so you cannot wipe your computer’s own disk by mistake. Check the size shown matches your card.
  4. Customisation: fill in the settings pages described below. This is what lets the Pi join your network and accept SSH on its very first boot.
  5. Write: review the summary, click Write, and confirm the warning that everything on the card will be erased. Imager writes the image and then verifies it, which takes several minutes.
  6. When Imager says it is done, eject the card.

The customisation pages

  • Hostname: the name your Pi will use on the network. Keep it short, lowercase and without spaces, for example pi5. You will type it to connect.
  • Localisation: choose your capital city, then check the time zone and keyboard layout it fills in (for example America/New_York and a US keyboard).
  • User: create a username and a strong password. There is no default pi account with a known password anymore, so write these down.
  • Wi-Fi: enter your network name (SSID) and password exactly, including capital letters. Skip this if you are using Ethernet. The Zero 2 W only supports 2.4GHz networks.
  • Remote access: turn on SSH. Choose password authentication to log in with the password you just set, or public key authentication if you already have an SSH key on your computer.
  • Raspberry Pi Connect: optional. It lets you reach the Pi through a browser from anywhere. You can skip it for now.

Step 3: First boot

  1. Put the board in its case and slide the microSD card into the slot on the underside.
  2. If you are using them, connect the monitor, keyboard, mouse and Ethernet cable now.
  3. Plug in the power supply last. The Pi has no on switch for its first start; it boots as soon as it gets power.
  4. Wait. The status LED will flicker as the system sets itself up, and the first boot can take a few minutes and may restart once. Give it about five minutes before deciding something is wrong.

With a monitor attached and the desktop version, you will end up at the desktop, already logged in with your settings. If you are running headless, move on to the next step.

Step 4: Connect over SSH from Windows or Mac

Both Windows 10/11 and macOS have an SSH client built in, so you do not need extra software. On Windows open PowerShell or Command Prompt; on a Mac open Terminal. Then type the following, swapping in the username and hostname you chose in Imager:

ssh yourname@pi5.local
  1. The first time, SSH asks whether you trust this host. Type yes and press Enter. It only asks once.
  2. Enter your password. Nothing appears on screen as you type; that is normal.
  3. When the prompt changes to something like yourname@pi5:~ $, you are working on the Pi.

If the .local name does not resolve, find the Pi’s IP address in your router’s list of connected devices and connect with that instead, for example ssh yourname@192.168.1.50.

Step 5: Update the system

The image you flashed is a snapshot, so there are usually newer packages waiting. Refresh the package list, then install everything:

sudo apt update
sudo apt full-upgrade -y

Raspberry Pi recommends full-upgrade over plain upgrade because its packages change dependencies more often than standard Debian. If a new kernel or firmware was installed, restart:

sudo reboot

Your SSH session will drop. Wait a minute, then connect again. Avoid rpi-update; it installs pre-release firmware meant for testing, not for everyday use.

Step 6: Learn your way around raspi-config

raspi-config is a text menu for changing system settings. Open it with:

sudo raspi-config

Move with the arrow keys, press Enter to select, and use Tab to jump to Finish. The sections you will use most:

  • System Options: change your password or hostname, and choose whether to boot to the desktop or the command line.
  • Interface Options: switch on SSH, I2C, SPI, serial and the camera. Many sensor projects start here.
  • Localisation Options: fix the time zone, keyboard layout or locale if you skipped them in Imager.
  • Update: updates raspi-config itself.

On the desktop version, the same kinds of settings are in the graphical Control Centre, under the Raspberry Pi menu, Preferences.

Step 7: Shut down safely

Pulling the plug while the Pi is writing to the card can corrupt it, so always shut down first:

sudo shutdown -h now

Wait until the green activity LED stops blinking before you unplug. On the desktop, use the Shutdown option in the Raspberry Pi menu instead. A Pi 5 also has a small power button. On Lite, one press starts a clean shutdown. On the desktop, one press opens a shutdown menu and a quick double press shuts down. Pressing it while the board is off but still plugged in starts it back up. Pressing and holding the button forces a hard power-off, so save that for when the system has frozen.

Troubleshooting

  • “Could not resolve hostname”: wait a few more minutes after first boot, double-check the hostname spelling, or connect by IP address from your router’s device list.
  • The Pi never joins Wi-Fi: the SSID or password was probably mistyped, or the Wi-Fi country was wrong. Re-flash the card with corrected settings, or plug in Ethernet and fix it in raspi-config.
  • “Permission denied” when logging in: you are using the wrong username or password. Usernames are case-sensitive, and there is no default pi account.
  • Low-voltage warnings or random reboots: use the official power supply for your model. Phone chargers often cannot deliver what a Pi 5 needs.
  • Imager will not write to the card on Windows: close any File Explorer windows showing the card, or right-click Imager and run it as administrator.

Where to go next

Sources: Raspberry Pi Documentation: Getting started, Raspberry Pi: A new Raspberry Pi Imager, Raspberry Pi OS downloads, Raspberry Pi Documentation: Raspberry Pi OS, Raspberry Pi Documentation: Configuration, Raspberry Pi Documentation: Remote access, Raspberry Pi Documentation: Raspberry Pi hardware