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
-
Download and install Raspberry Pi Imager on your computer.
-
Insert the microSD card into the card reader and plug it into your computer.
-
Launch Raspberry Pi Imager.
-
Choose your device (e.g. Raspberry Pi 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.
-
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
- Insert the microSD card into the Raspberry Pi.
- Connect a monitor, keyboard, and mouse to the Pi.
- Plug in the power supply to boot it.
- Follow the on-screen setup wizard. If you flashed Kali Linux, wait for it to finish booting and log in with username
kaliand passwordkali. - 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.
-
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 -
If you need a full desktop environment, enable VNC:
sudo raspi-configGo to Interface Options → VNC → Enable.
-
Install RealVNC Viewer on your computer and connect to
<hostname>@<username>(or the Pi’s IP address) to get a remote desktop.
Related
- How to run a Python script automatically on Raspberry Pi boot — running a script automatically on Raspberry Pi boot
- How to communicate between a Raspberry Pi and an Arduino over serial — communicating between a Raspberry Pi and an Arduino over serial
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.





