Despite its extremely small size, a newer generation Raspberry Pi comes with a built in WiFi chip that allows it to connect to wireless networks. Those with a Raspberry Pi 4, Raspberry Pi 3, or Raspberry Pi Zero W no longer need to rely exclusively on Ethernet connections to enable access to a local network or the internet. In case you are not sure which Raspberry Pi you have, check our tutorial on how to check Raspberry Pi model. Although connecting via Ethernet is straightforward, connecting to a WiFi network will require a few more steps.
In this tutorial, we will go through the step by step instructions to connect to a WiFi network on a Raspberry Pi. This will include instructions for both command line and GUI. If you only plan to use SSH to manage your Raspberry Pi, then the WiFi settings can be applied before installation. Otherwise, you will need to establish a temporary connection to the Raspberry Pi through other means. If not, you are stuck connecting your device to a monitor until you can at least get it connected to a network.
In this tutorial you will learn:
- How to connect to WiFi via Raspberry Pi imager
- How to connect to WiFi via command line
- How to connect to WiFi via GUI

Category | Requirements, Conventions or Software Version Used |
---|---|
System | Raspberry Pi |
Software | N/A |
Other | Privileged access to your Linux system as root or via the sudo command. |
Conventions |
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
Connect to WiFi via Raspberry Pi Imager
Many users do not plan on ever hooking up their Raspberry Pi to a monitor, and only want to manage it via an SSH session or other command line tool. Then, how are they supposed to connect to a WiFi network? Fortunately, the Raspberry Pi developers have thought of this problem and addressed it by adding an option in the imager tool for WiFi network name and login credentials. This means that we are able to provide our WiFi network information in the Rasperry Pi OS installation file itself.
- Start by downloading the Raspberry Pi imager tool from the official download page, in case you do not already have it. The tool is available for Linux, MacOS, and Windows.
Downloading the Raspberry Pi imaging tool - After you have installed the program, open it and you will find the WiFi settings hidden in the menu accessible by the cog wheel.
Click on the cog wheel to access WiFi settings - Scroll down part way and you will be able to enter the desired WiFi SSID and password, along with a few other pertinent settings.
NOTE
In the same panel, be sure to also enable SSH connection so that you can connect to the device after it has been powered on.Filling out the WiFi information for Raspberry Pi
All done. Your Raspberry Pi will attempt to connect to the WiFi network you provided after installation and first boot up.
Connect to WiFi via command line
If you have command line access to your Raspberry Pi, then it is very easy to connect to a WiFi network thanks to the raspi-config utility. Follow the steps below to get your Raspberry Pi connected to WiFi from the command line:
- Start by launching the raspi-config utility with the following command:
$ sudo raspi-config
- We can navigate around the raspi-config menus using our keyboard’s arrow keys and pressing
Enter
to make a selection. With this in mind, highlight the ‘System Options’ option and pressEnter
.Open the System Options menu from raspi-config - Next, use your keyboard to select the ‘Wireless LAN’ option.
Selecting the Wireless LAN option within raspi-config - On the next page, enter the SSID of the wireless network. This is the name of the WiFi that is being broadcast. After entering the name, press
Enter
to proceed.
Enter the SSID of the wireless network that you wish to connect to - Lastly, we need to enter the passphrase that grants us access to the WiFi network. Once you are done, press
Enter
and your Raspberry Pi will connect to the network, assuming that all the details you provided were correct.Entering the passphrase for the WiFi network we want to connect to
Connect to WiFi via GUI
In case you want to connect to a WiFi network on your Raspberry Pi from the GUI desktop environment, it is very simple. Get started by clicking on the WiFi network icon in the upper right corner of your screen.

Then, select the WiFi network you wish to connect to, and enter the password.
Closing Thoughts
In this tutorial, we saw how to connect to a WiFi network on a Raspberry Pi system. We have a variety of ways to accomplish this task. The imager method is helpful if we do not plan to connect Ethernet or a monitor to the Raspberry Pi, and the command line method makes the process very easy if we have command line or SSH access established already. Finally, the GUI method is the easiest one but requires that we have a monitor connected to the Raspberry Pi.