How to set up a Raspberry Pi (with or without a monitor)

Based on contributions by pauladelahoz, Ihsan.

Before you can use a Raspberry Pi in a project you need to flash an operating system onto an SD card and get it online. This guide covers both the normal setup (with a monitor, keyboard, and mouse attached) and the headless setup (no monitor needed, everything done over SSH/VNC).

What you need

  • A Raspberry Pi board (ideally in a case)
  • A power supply for the Raspberry Pi
  • A microSD card (32GB minimum) and a microSD card reader
  • A computer to flash the card and run Raspberry Pi Imager
  • For a monitor setup: a keyboard, a mouse, an HDMI-compatible monitor, and an HDMI-to-micro-HDMI cable
  • For a headless setup: just your computer and a network connection (Wi-Fi or Ethernet)

Steps

1. Flash the OS with Raspberry Pi Imager

  1. Download and install Raspberry Pi Imager on your computer.

  2. Insert the microSD card into the card reader and plug it into your computer.

  3. Launch Raspberry Pi Imager.

  4. Choose your device (e.g. Raspberry Pi 5).

  5. Choose the operating system to install. Raspberry Pi OS is the default choice; other options (e.g. Kali Linux) are also listed if your project needs them.

  6. Choose the microSD card as the storage target.

If you’re doing a headless setup, before clicking through to write the image, open the OS customization options (gear icon, or press Ctrl+Shift+X) and fill in a hostname, username, and password, plus your Wi-Fi SSID and password. Then go to the Services tab and enable SSH. This lets you skip attaching a monitor entirely.

Click “Next” to write the OS image to the card.

2. Option A — first boot with a monitor

  1. Insert the microSD card into the Raspberry Pi.
  2. Connect a monitor, keyboard, and mouse to the Pi.
  3. Plug in the power supply to boot it.
  4. Follow the on-screen setup wizard. If you flashed Kali Linux, wait for it to finish booting and log in with username kali and password kali.
  5. Connect to Wi-Fi. If your network uses WPA/WPA2 Enterprise (as in the SMR lab):
    • Security: WPA & WPA2 Enterprise
    • Authentication: Protected EAP (PEAP)
    • CA certificate: select “No CA certificate is required”
    • PEAP version: Automatic
    • Inner authentication: MSCHAPv2
    • Enter your username and password, then click “Connect”.

3. Option B — headless setup (no monitor)

If you enabled SSH and configured Wi-Fi during imaging (step 1), insert the card and power on the Pi. It will boot and connect to your network on its own.

  1. Open a terminal on your computer and connect over SSH using the hostname/username you set during imaging:

    ssh <username>@<hostname>
    # e.g. ssh john@raspberrypi
    
  2. If you need a full desktop environment, enable VNC:

    sudo raspi-config
    

    Go to Interface Options → VNC → Enable.

  3. Install RealVNC Viewer on your computer and connect to <hostname>@<username> (or the Pi’s IP address) to get a remote desktop.

Related


Rewritten and consolidated (Sept 2026) from the original student how-to’s: How to set up a Raspberry Pi, How to setup raspberry pi without monitor (headless) setup.