Here are the three most common (and reliable) ways to set up Wi-Fi on a Raspberry Pi 4, depending on whether you have a screen/keyboard and whether you’re flashing a fresh SD card.
Option 1: Easiest (fresh install) — set Wi-Fi in Raspberry Pi Imager
When you flash Raspberry Pi OS, Raspberry Pi Imager can preconfigure Wi-Fi credentials so the Pi connects on first boot.
Steps
- Open Raspberry Pi Imager → choose OS + Storage.
- Go to Customise / Settings (gear icon).
- Set Wi-Fi SSID + password, country/timezone, and (optionally) enable SSH.
- Write the card, boot the Pi.
This is the best method for headless setups.
Option 2: You have Desktop GUI (monitor/keyboard) — click the network icon
Raspberry Pi OS provides a GUI Wi-Fi picker via the network icon on the right side of the top bar.
Steps
- Click the network/Wi-Fi icon (top-right).
- Select your SSID.
- Enter the password → OK, wait a few seconds.
Important (Pi 4 dual-band): set WLAN country
On dual-band models (like Pi 4), Wi-Fi may stay disabled until you set the wireless LAN country. Do it in Preferences → Control Centre → Localisation.
Option 3: Raspberry Pi OS Lite / Headless — use raspi-config + nmcli (Bookworm+)
On Raspberry Pi OS Bookworm and later, NetworkManager is the default networking tool.
1) Set Wi-Fi country (one-time)
sudo raspi-config
Go to Localisation Options → WLAN Country and pick your country.
Raspberry Pi
2) Scan and connect with nmcli
Check Wi-Fi radio:
nmcli radio wifi
List networks:
nmcli dev wifi list
Connect (prompts for password):
sudo nmcli --ask dev wifi connect "<your_ssid>"
These commands are the official recommended flow for CLI Wi-Fi setup on Pi OS.
Note: The old trick of dropping wpa_supplicant.conf onto the boot partition doesn’t work on Bookworm+.

Top comments (0)