Initial Setup Guide for Raspberry Pi¶
This guide walks you through the process of installing an operating system on your Raspberry Pi and completing essential first-time setup tasks. Whether you're using your Pi with a monitor (standard setup) or without one (headless setup), these instructions will help you get started.
Choosing an Operating System¶
Raspberry Pi supports several operating systems, each with different strengths:
| OS | Description | Best For |
|---|---|---|
| Raspberry Pi OS (64-bit) | Official OS with 64-bit architecture | Modern Pi models (3/4/5/Zero 2), best performance and Docker support |
| Raspberry Pi OS (32-bit) | Official OS for legacy 32-bit CPUs | Older models (Pi 1/2/Zero) or memory-constrained setups |
| Raspberry Pi OS Lite | Minimal version without desktop | Headless servers, IoT, and resource-constrained setups (CLI only) |
| Ubuntu Server | Enterprise-grade server OS | Containerized workloads, Docker, and developer environments |
| RetroPie | Gaming and emulation platform | Retro gaming consoles |
| LibreELEC | Media center focused | Home theater systems |
For beginners, Raspberry Pi OS (64-bit) is highly recommended if you are using a Raspberry Pi 3, 4, 5, or Zero 2 W. It offers the best performance, modern software compatibility, and full support for containers. Use the 32-bit version only if you are using older hardware (like the original Raspberry Pi 1, 2, or Zero/Zero W).
Installing the Operating System¶
Method 1: Using Raspberry Pi Imager (Recommended)¶
The Raspberry Pi Imager is the easiest way to install an operating system on your microSD card.
-
Download Raspberry Pi Imager
- Visit the official website
- Download and install the appropriate version for your computer
-
Install Raspberry Pi Imager
- On Windows/Mac: Run the installer
- On Linux (Debian/Ubuntu):
-
Write the OS to SD Card
- Insert your microSD card into your computer
- Launch Raspberry Pi Imager
- Click "Choose OS" and select your preferred Raspberry Pi OS version
- Click "Choose Storage" and select your microSD card
- Click the gear icon (⚙️) to access advanced options:
- Set hostname (e.g., raspberrypi)
- Enable SSH (for headless setup)
- Configure Wi-Fi (for headless setup)
- Set username and password
- Configure locale settings
- Click "Write" and wait for the process to complete
- Remove the SD card when prompted
Method 2: Manual Image Download and Installation¶
If you prefer to download the OS image directly:
-
Download OS Image
- Visit Raspberry Pi OS Downloads
- Download your preferred OS version
-
Write Image to SD Card
- On Windows: Use Win32 Disk Imager or balenaEtcher
- On macOS: Use balenaEtcher or
ddcommand in Terminal - On Linux: Use balenaEtcher or
ddcommand:
-
Configure for Headless Setup (Optional)
[!WARNING] Starting with Raspberry Pi OS Bookworm (Debian 12), the network backend has transitioned from
dhcpcdto NetworkManager. Consequently, placing awpa_supplicant.conffile in the boot partition is no longer supported on modern releases.We highly recommend using Method 1 (Raspberry Pi Imager) to pre-configure Wi-Fi and SSH via its OS Customisation settings. If you must set it up manually on a flashed card:
- Enable SSH: Create an empty file named
ssh(orssh.txt) in the boot partition. - Configure Wi-Fi via NetworkManager:
Create a file named
system-connections/preconfigured.nmconnectionin the boot partition (often mounted as/boot/firmware/on Bookworm) and configure it as follows:
- Enable SSH: Create an empty file named
First Boot Setup¶
Standard Setup (With Monitor)¶
- Insert the SD card into your Raspberry Pi
- Connect peripherals: HDMI display, keyboard, mouse, and power
- Power on your Raspberry Pi
- Complete the Welcome Wizard:
- Set country, language, and timezone
- Create a user account (or use the default 'pi' user if pre-configured)
- Configure Wi-Fi if not already set
- Update software when prompted
Headless Setup (Without Monitor)¶
- Insert the SD card into your Raspberry Pi
- Connect network: Either Ethernet cable or pre-configured Wi-Fi
- Power on your Raspberry Pi
-
Find your Pi's IP address using one of these methods:
- Check your router's connected devices list
- Use a network scanner like
nmap: - Use multicast DNS (if supported):
ping raspberrypi.local
-
Connect via SSH:
- On Windows: Use PuTTY or Windows Terminal
- On macOS/Linux: Use Terminal
- Default credentials (if not customized):
- Username:
pi - Password:
raspberry
- Username:
System Updates and Package Installation¶
Always update your system after the first boot:
Post-Installation Configuration¶
Essential Security Settings¶
-
Change Default Password (if you haven't already):
-
Enable SSH (if not already enabled):
-
Configure Firewall:
-
Update System Firmware (Only if necessary):
[!CAUTION] Do NOT use
sudo rpi-updatefor routine updates. This tool installs bleeding-edge, experimental pre-release kernels and firmware that can make your system unstable or unbootable.For stable and safe firmware updates, always use the standard package manager:
System Optimization¶
-
Configure Memory Split (for desktop vs. GPU):
-
Enable Hardware Acceleration (for media playback):
-
Overclocking (optional, for advanced users):
Warning: Overclocking may reduce the lifespan of your Pi and requires adequate cooling.
Configure Display and Locale Settings¶
Enable Additional Interfaces¶
Enable hardware interfaces you plan to use:
Desktop Environment Customization¶
If you're using Raspberry Pi OS with desktop:
-
Change Theme:
- Right-click on desktop > Appearance Settings
-
Configure Panels and Menus:
- Right-click on panel > Panel Settings
-
Install Additional Software:
Backup Your Configuration¶
Once you've completed your setup, consider backing up your SD card:
Or use tools like PiShrink to create compressed backups.
Troubleshooting First Boot Issues¶
No Display Output¶
- Check HDMI connection
- Try a different HDMI cable
- Edit
config.txton the SD card (from another computer) and add:
Cannot Connect via SSH¶
- Verify SSH is enabled
- Check network connection
- Ensure firewall allows SSH connections
- Confirm correct IP address or hostname
Wi-Fi Not Connecting¶
- Verify correct SSID and password in
wpa_supplicant.conf - Check country code setting
- Try connecting to 2.4GHz instead of 5GHz network (better range and compatibility)
Boot Process Hangs¶
- Use a high-quality power supply (official recommended)
- Check for SD card corruption
- Try a fresh OS installation
Next Steps¶
After completing the initial setup, you might want to:
- Learn Essential Linux Commands
- Configure Network Settings
- Optimize your Pi with Power Saving Techniques
- Set up Remote Access Options
Welcome to the Raspberry Pi community! With your device now set up, you're ready to explore the exciting possibilities of this versatile computing platform.