BaReinhard's Tech Blog

A blog of various technologies, largely based around the Raspberry Pi.

Follow me on GitHub Follow me on Instagram

Setup WiFi on your Raspberry Pi (terminal only)

For those of you who decided to go with the lastest installation of Raspbian (Lite) without X.

You may be wondering how to go about setting up the WiFi to connect your router. It may seem pretty complicated but its actually quite easy.

Your first step is to actually scan for your SSID, the easiest way to do sudo iwlist wlan0 scan | grep ESSID

Which should give you the following output: ESSID: TWC21721

With the above information you will need to edit your wpa-supplicant file :

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Go to the bottom of your file and add the following:

network={
    ssid="TWC21721"
    psk="Your_wifi_password"
} 

Normally, your Raspberry Pi should notice the change and try to connect. If it does not simply issue the following commands:

sudo ifdown wlan0

sudo ifup wlan0

If that does not work, you will need to restart your Raspberry pi with the following command: sudo reboot

Now you should have a functioning WiFi connection! Now just sudo apt-get it!