How to Configure Wi-Fi on Raspberry Pi? (4 Easy Ways)
All recent Raspberry Pi models include a wireless connection, but the configuration is not always easy, especially if you don’t have a graphical interface or need to set up an advanced Wi-Fi configuration. Don’t worry, I’ll explain everything with simple steps in this tutorial.
On Raspberry Pi, Wi-Fi can be configured during the OS installation using Raspberry Pi Imager, by entering the network name and password in the advanced settings. It can also be set up later from the desktop using the network icon in the taskbar or raspi-config in the terminal.
I’ll show you how to do everything in this post. There are several solutions available depending on your system version and access to it. I’ve ordered them from most recommended / simple to most advanced, so feel free to jump directly to the method you’re looking for.
If you’re feeling lost in all the Raspberry Pi jargon, I’ve got something to help you out. I’ve created a free glossary that explains all the essential terms and abbreviations in a way that’s easy to understand. It’s a great resource to have by your side. Get your free copy here.
Set Wi-Fi in Raspberry Pi Imager
Configuring before first boot (recommended)
The easiest way currently to set up your Wi-Fi connection before the first boot is to use Raspberry Pi Imager.

This tool includes a ‘Customisation’ section where you can set up a few things when installing a new system, including the wireless network you want to use:
You might also like: Pi5 vs. Pi4: I tested them, here's the result
- Download and install Raspberry Pi Imager.
If you don’t have it yet, you can get it for free from the official website.
It’s available for Windows, Linux, and even for Raspberry Pi OS. - Make the essential selections:
- Device – choose your Raspberry Pi board, or select “No filtering” at the bottom.
- OS – choose the operating system you want to use (let’s say Raspberry Pi OS).
- Storage – choose the storage device (SD card or USB).
- When you’re done with each step, click the NEXT button to continue.
- Customisation – In this section, you’ll customize your new system.
- Hostname – give your system a name.
- Localisation – choose your time zone and keyboard.
- User – create your first user account
- Configure Wi-Fi settings in the ‘Wi-Fi’ step.
Here, you’ll enter your network name and its password.
Hit NEXT, skipping the next parts if you’d like, until you get down to the ‘Writing’ step.
- On the ‘Writing’ step, you’ll see a summary of the choices you’ve made.
Click the WRITE button, and flashing will begin.
Your Raspberry Pi will be connected automatically to your network on the first boot.
Note: Some versions of Raspberry Pi Imager v1.9 did not set the country code correctly, causing Wi-Fi connection failures. This bug has since been patched. If you’re having issues, download and install the newest version of Imager here.
If you’re using this tool for the first time, please take a look at my complete guide about Raspberry Pi Imager here. I explain everything in more detail and give you many advanced tips.
You can get answers from real experts in minutes.
Get help with your setup
Configure Wi-Fi on Raspberry Pi OS Desktop
Connecting via GUI
What if your operating system is already installed and you need to change your Wi-Fi settings?
Here are two ways to do it on Raspberry Pi OS from the desktop interface.
Keep in mind that if you’re using a USB Wi-Fi adapter on your Raspberry Pi, not all solutions will work. Click on that link for more details.
Via the Welcome Wizard
If it’s your first boot and you haven’t configured anything via Raspberry Pi Imager or other methods, you should get a “Welcome to Raspberry Pi” wizard asking you to configure a few things on your system.
Bonus tip: When I started, the hardest part wasn’t the setup, it was figuring out what to build next. I ended up creating a list of 75+ project ideas with links and difficulty, so it’s easier to just pick something and try it. Grab the list here.
If you want a clearer path than jumping from tutorial to tutorial, my book gives you a step-by-step roadmap to really understand your Raspberry Pi.
Check the book hereIt’s the easiest way to configure the Wi-Fi on a newly installed Raspberry Pi OS, so don’t miss this menu. You’ll be asked to configure the country, set the keyboard layout, and create a new user.
Then you’ll get a window like this to select a wireless network:

Select your Wi-Fi network SSID in the list, click “Next,” and type the password on the following screen:

A few seconds later, the Raspberry Pi will be connected to your Wi-Fi.
Via the Taskbar
If you missed the welcome wizard or skipped the Wi-Fi configuration here, you can change it at any time from the taskbar panel.
At the top-right of your screen, you have the main panel with the menu, shortcuts, and the clock.
- Near the clock, there is a network symbol (showing two red crosses if you’re disconnected, or two blue arrows if you’re connected via Ethernet).
- Click on it, and a list of available wireless networks will appear.

- Select your network from the list and enter your password.
That’s it, you should be connected instantly. It’s not very complicated either 🙂
Enable Wi-Fi on Raspberry Pi OS Lite
Connecting via command line
You might also like: Not Every Raspberry Pi Project Is Worth Building
If you’re on Raspberry Pi OS Lite and only have a command-line interface, you may need more help to find out how to configure your network.
Let’s explore two methods to do this (the first one is recommended).
Using the raspi-config Tool
The Raspberry Pi Foundation was thinking of you. Even if you’re on a black-and-white terminal, there’s a tool to help you configure everything on the system including your wireless network.
This tool is named raspi-config, and it’s available by default on Raspberry Pi OS Lite:
- Launch the Raspberry Pi Software Configuration Tool with:
sudo raspi-config
- Go to System Options > Wireless LAN.

- Type your SSID and your password.

- You may get a warning that it won’t connect unless you set the country code first.
If so, go to Localisation Options > WLAN Country and select your country. - Save & exit the tool.
After a few seconds, your Pi will be connected to the wireless network you chose.
That’s the easy way to configure Wi-Fi on Raspberry Pi OS Lite.
Note: On older versions of Raspberry Pi OS, the menu may be slightly different. If you can’t find it, the wireless configuration is probably under Network Options > Wi-Fi.
Manual Configuration With nmtui
If for any reason, raspi-config is not an option for you, there are other tools you can try.
Since Raspberry Pi OS Bookworm, wpa_supplicant is no longer being used. The good news is that there’s a newer and easier tool to manually configure Wi-Fi.
- Launch the Network Manager configuration tool with this command:
sudo nmtui - A window like this one shows up:

- Simply use the wizard to “Activate a connection” and access your Wi-Fi network:

Once a connection is added (like the Wi-Fi network in my example), you can choose “Edit a connection” to change the security, enter the password, or set a static IP address.

Tip: Command lines can be a pain to memorize. I put the essential Linux commands on a printable cheat sheet so you don't have to keep googling them. You can grab the PDF here if you want to save some time.
Headless + Manual Configuration
Doing it the hard way
Bonus tip: When I started, the hardest part wasn’t the setup, it was figuring out what to build next. I ended up creating a list of 75+ project ideas with links and difficulty, so it’s easier to just pick something and try it. Grab the list here.
I call this “headless” because it’s the method to use when you don’t have a screen on your Raspberry Pi.
Raspberry Pi OS Bookworm/Trixie and Newer
Note: Using wpa_supplicant doesn’t work on Raspberry Pi OS Bookworm/Trixie, which have since switched to using Network Manager. As of this update, there is no manual method that works prior to first boot to create an automatic Wi-Fi connection.
The easiest alternative is to use the Imager method above.
(For those who don’t want to give up, you might be able to use nmcli with a boot script, but I was not able to test a method that worked at this time.)
Bonus Tip: Besides setting your Wi-Fi connection automatically, another thing you may want to do if you really use your Raspberry Pi without a screen is to enable the SSH service automatically. On Raspberry Pi OS, SSH is disabled by default.
To enable it automatically, you have to create a file and add it to the SD card.
Just create an empty file named “ssh” and copy it to the boot partition.
That’s enough to tell Raspberry Pi OS to start the SSH service automatically on boot.
It’s something I use all the time, and I explained it in more detail in this tutorial on how to install a Raspberry Pi without a screen and keyboard.
Raspberry Pi OS Bullseye and Older Versions
The idea is to add a new file on the SD card (or USB drive) that will include the Wi-Fi configuration. This file is named “wpa_supplicant.conf” and will include your Wi-Fi credentials.
Here are the steps to create this file:
- Open your favorite text editor on your PC.
The basic editor from your operating system will be fine (Notepad for example). - Copy and paste these lines into it:
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="YOURSSID"
scan_ssid=1
psk="YOURPASSWORD"
key_mgmt=WPA-PSK
}
- Replace the variables with your SSID, password, and country code.
This is the configuration for a standard WPA-PSK wireless network, check the documentation for more advanced options. - Save the file to a location you can find easily.
- Insert your SD card into your PC.
If you don’t have an SD card reader on your PC, you can get a cheap USB-to-SD card adapter on Amazon. - Copy the wpa_supplicant.conf file to the boot partition.
Now when you boot your new Raspberry Pi OS system the first time, it should automatically connect to your Wi-Fi network.
You can find many examples here to adapt the configuration to your network (if you use WEP, EAP, or any other security options).
And if you also need to set up a static IP address on your Raspberry Pi, you can click on the link to my other tutorial where I explain all the steps (scroll to the end of the article for the method with command lines).
Still stuck after following this guide? Drop your question in the RaspberryTips Community — real Pi users answer fast. Post your question here.
Going Further
That’s it, you now know different ways to set up the Wi-Fi on your Raspberry Pi, whatever the system version you use or your network complexity.
As a general rule, I would recommend using the customization options in Raspberry Pi imager whenever possible, but you have discovered many other solutions to suit each situation. You learned a lot today!
Now that you’re connected to the Internet, you can start having fun with many different projects on your Raspberry Pi. Here are a few articles I wrote that you can check out for more ideas :
- 15 Easy Projects for Raspberry Pi Beginners (With Links)
- 7 Raspberry Pi Projects That Will Save You Money
- 25 Awesome Raspberry Pi Project Ideas at Home
- 11 Cool Projects Ideas for the Raspberry Pi Camera Module
- Raspberry Pi : 20 projects for your kids
Not getting the same result?
Even when you follow every step, small differences in OS version, hardware or config can change the outcome. Instead of wasting time guessing, get help from people who have already fixed the same kind of issue.
- Get help on your exact issue
- Access step-by-step videos for tricky setups
- Browse the website without ads

I run Motioneye on my PI, I have recently changed my home router, now the PI cannot log in because the router and password info is incorrect. I am unable to get to the command screen as Motioneye starts up on boot? how do I now change the router info please?
Hi Ken,
I suppose you want to say “motionEyeOS”
I don’t know this OS, but in the wiki, they say that the configuration is in the wpa_supplicant.conf file, maybe /data/etc/wpa_supplicant.conf
If you find it, you can edit the file with the default editor and update your settings
In RPi-A there is no /etc/dhcpcd.conf file, only /etc/dhcp/dhclient* files.