UNBLOCK ANY WEBSITE! With A VPN Surf The Web Anonymously Find out More

How to set up WiFi on a Raspberry Pi

If you happen to have the first generation of the little credit-card sized computer, i.e., the Raspberry Pi then configuring and setting up the Wi-Fi connection on the same isn’t possible officially. That’s because, the device’s hardware lacks an internal Wi-Fi modem. Now, you’ve two options from here.

Either, you can buy a newer model, i.e., Raspberry Pi Model B, which comes with integrated Wi-Fi modem, or you can learn how to setup WiFi on a Raspberry Pi you’re already having. Unless you are ready to spend extra dollars and want to have the newer model of the computing chip too, this guide is going to help you.

According to me, even if you buy a newer device, you should be learning this method and test it on the older one. That’s because, you’re a tech geek and you must be aware of this existing and working method. I mean, that was the reason why you bought this Raspberry Pi, yes, to prove your geekiness.

How to Setup Up WiFi on a Raspberry Pi?

Probably, the first thing you need is an external Wi-Fi modem connector, which comes with USB adapter. As you’re already aware that every device comes with a USB port, so you know how to get the modem inserted.

Before making any purchase for the Wi-Fi adapter, I’ll recommend you to check this list over here, which comprise of all the compatible USB Wi-Fi modem with this previous generation of pocket computer. It is highly recommended that you buy a 100% compatible modem only.

That’s it! The first part is over. You’re all set to move onto the second one. The second part can be completed via two methods. First, by using a GUI tool for setting up the Wi-Fi connection and the second one is by using the command prompt. As a developer, it is always recommended to try the command prompt method, but if you’re in a hurry and in no mood to waste any single minute, then go for the GUI one.

#1 Command Prompt method

You need to run a bunch of command instructions to get done with this setup manually. By manually, I mean the command prompt method itself, as I prefer calling it manually.

If the system at your end, isn’t shipped with the packages pre-installed, then the first command is the following one, which you need to execute.

sudo apt-get install wpasupplicant wireless-tools

Now, the next command to execute is the interface one. It will pick up the location for the previous command.

sudo nano /etc/network/interfaces

Now, you’ve to make sure that the part about wlan0 is mentioned just like as below. It is very necessary, otherwise the commands won’t work, as I’ve added.

allow-hotplug wlan0

iface wlan0 inet manual

wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp

Now, it’s time to get a list of available Wi-Fi network in your area. Execute the following code.

sudo iwlist wlan0 scan

Select a network from the list and insert the network authentication information in the “wpa_supplicant.conf” file. Yes, this is the file which will hold the network details from your side.

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Now, it’s time to add below mentioned data into the one at your screen.






Finally, once you see the available network configured well, its time to reboot the system. For that, execute the following code.

sudo reboot

Once the system gets restarted, the Wi-Fi connectivity will be available at your end and I hope you went through the process as described.

#2 GUI method

This method works in case if you’re using a complete desktop using the Raspberry Pi chipset. You need to start the system and hit the “WiFi Config” shortcut at the desktop screen. It will start the Wi-Fi configuration program, instantly.


Here, you’ll see two options. The first one will share details of the USB modem inserted, and the second one will showcase the connection details if the system was connected to any, previously. Since, you’re doing it for the first time, you’ll see none.

So, hit the “Scan” button over there and then a window will appear. It will be listing every available network with signal strength and few more details. You need to double click any of the networks, you wish to get connected with.


It will launch a Connection window then, having details of the network. You need to verify the authentication and encryption setting and enter the network password in the PSK section. Click on “Add” button and you’re done.

The system at your end will be then connected to the Wi-Fi network you just configured. If you wish to configure two or more available networks, then the same process needs to be repeated.

I hope you went smoothly through the process and didn’t manage to find yourself into any issue. Was it simple to remember in future?

Add a Comment

Your email address will not be published. Required fields are marked *