The fastest way to get your Raspberry Pi online

You can connect your Raspberry Pi to Wi-Fi in two ways: through the graphical desktop if you have a monitor and keyboard plugged in, or through the command line if you are setting it up headless (without a display). The graphical method takes about two minutes. The command-line method requires editing a configuration file but works even if you have no screen to look at.

Both methods work with Raspberry Pi OS, the official operating system. If you are running a different OS, the steps may differ slightly, but the principle is the same — you are telling the Pi which network to join and providing the password.

Key Takeaways

  • The easiest method is clicking the Wi-Fi icon in the top-right corner of the desktop and selecting your network from the list.
  • If your Pi has no monitor, you can add Wi-Fi details to the SD card before you boot it up by editing the wpa_supplicant.conf file.
  • Your Wi-Fi password is case-sensitive, so type it exactly as it appears, including capital letters and special characters.
  • After connecting, wait 10 to 15 seconds for the Pi to join the network — the Wi-Fi icon will show a filled circle when it is connected.
  • If the connection fails, restart the Pi and check that your password is correct and your network is broadcasting its name.

Connecting through the desktop (with a monitor and keyboard)

This is the simplest method if you have a screen and input devices already set up. Look at the top-right corner of your desktop. You will see a Wi-Fi icon that looks like a fan or radio waves. Click it once.

A menu will drop down showing all the Wi-Fi networks within range. Find your network name (called the SSID) and click it. A small window will appear asking for your password. Type your password exactly as it is — uppercase and lowercase letters matter, as do spaces and special characters like hyphens or underscores. Click the "OK" button or press Enter.

The Pi will connect within 10 to 15 seconds. The Wi-Fi icon will change to show a filled circle or solid bars, indicating you are connected. If nothing happens after 30 seconds, the password was likely wrong. Click the Wi-Fi icon again and try once more, typing very carefully.

Connecting without a monitor (headless setup)

If you do not have a monitor and keyboard, you can set up Wi-Fi before you turn the Pi on for the first time. You will need the SD card that Raspberry Pi OS is installed on, a computer with an SD card reader, and a text editor (Notepad on Windows, TextEdit on Mac, or gedit on Linux all work).

Insert the SD card into your computer. Open the file manager and look for a folder called "boot" or a partition labeled "bootfs". Inside, you should see a file called wpa_supplicant.conf. Open this file with your text editor.

Look for the section that says country=GB (or another country code). Below that, you will see a block that starts with network={. Inside that block, find the lines for ssid= and psk=. Replace the text after ssid= with your network name in quotes, and replace the text after psk= with your password in quotes. For example:

network={     ssid="MyNetworkName"     psk="MyPassword123" }

Make sure your password and network name are inside the quotation marks. Save the file, eject the SD card safely, insert it into your Pi, and power it on. The Pi will connect to Wi-Fi automatically when it boots.

What to do if your Pi will not connect

The most common reason for connection failure is a typo in the password. Passwords are case-sensitive, meaning "MyPassword" is different from "mypassword". If you typed it in the desktop method, try again and type very slowly, or copy and paste the password if you have it written down somewhere.

If you edited the wpa_supplicant.conf file, check that your network name and password are both inside quotation marks and that there are no extra spaces before or after them. A single extra space will cause the connection to fail. Save the file again and restart the Pi by unplugging it for 10 seconds and plugging it back in.

Another common issue is that your Wi-Fi network is not broadcasting its name. Some routers have a setting to hide the network name (SSID). If your network does not appear in the list, check your router settings and enable SSID broadcast, then restart the router and try again.

If your Pi connects briefly and then disconnects, the problem is usually that your router is too far away or there is interference from other devices. Move the Pi closer to the router or move other wireless devices (microwaves, cordless phones, baby monitors) away from the router.

Checking your connection and finding your Pi's IP address

Once your Pi is connected, you may need to know its IP address — the number that identifies it on your network. If you have a monitor, click the Wi-Fi icon and look for "Connection Information" or a similar option. The IP address will be listed there, usually starting with 192.168 or 10.0.

If you are connecting headless, you can find the IP address by logging into your router's settings page (usually at 192.168.1.1 or 192.168.0.1 in your browser) and looking for a list of connected devices. Your Pi will be listed there with its IP address. Alternatively, you can use a tool like Angry IP Scanner to scan your network and find all connected devices.

Switching to a different Wi-Fi network

To connect to a different network, click the Wi-Fi icon in the top-right corner and select "Turn Off Wi-Fi". Wait a few seconds, then click it again and select your new network from the list. Enter the password for the new network and wait for the connection to establish.

If you need to change the network on a headless Pi, you will need to edit the wpa_supplicant.conf file again using the same method as before. Insert the SD card into your computer, open the file, update the network name and password, save it, and restart the Pi.

Frequently Asked Questions

Can I connect to a 5GHz network instead of 2.4GHz?

Yes, most Raspberry Pi models support both 2.4GHz and 5GHz networks. Your router likely broadcasts both at the same time under the same network name. The Pi will automatically choose the best one. If you have separate network names for each band, you can connect to either one the same way.

What if I forget my Wi-Fi password?

You can find your password by logging into your router's settings page on another device. Open a web browser and go to 192.168.1.1 or 192.168.0.1, then log in with your router's username and password (usually printed on the router itself). Look for Wi-Fi settings or security settings to find your password.

Does the Raspberry Pi need to be restarted after connecting to Wi-Fi?

No, the Pi will start using the network immediately after you enter the password. You do not need to restart it. However, if the connection fails and you want to try again, restarting can sometimes help clear any temporary connection issues.

Can I connect to a guest network or a network that requires a login page?

Guest networks work the same way as regular networks — just select the network name and enter the password. Networks that require you to open a browser and log in (called captive portals) are more complicated and may not work on a headless Pi without extra setup. If you have a monitor, you can usually log in through the browser after connecting.

Why does my Pi keep disconnecting from Wi-Fi?

This usually happens if the Pi is too far from the router, if there is interference from other wireless devices, or if your router has a power-saving feature that disconnects inactive devices. Try moving the Pi closer to the router, or check your router settings to disable any power-saving features for Wi-Fi connections.