Connecting Raspberry PI to WIFI

Login to the Raspberry Pi.
The default Raspberry Pi credentials:

Username: pi
Password: raspberry
==================================================================================

If you need to find the network name of your local network you can run the following command in the Raspberry terminal:
> sudo iwlist wlan0 scan

This will list all the networks in your vicinity along with some useful information for each network. To find your network name look for something that look like: ESSID:”Test Wifi Network”.

Configuring your WiFi network

To tell the Raspberry Pi to automatically connect to your WiFi network you need to edit a file called: wpa_supplicant.conf.

To open the file in nano type the following command:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Scroll to the end of the file and add the following to the file to configure your network:

network={
   ssid="Test Wifi Network"
   psk="SecretPassWord"
}

Remember to replace this with your own network name and password.

Save and close the file by pressing Ctrl+X followed by Y or Ctrl+O followed by Ctrl+X. At this point the Raspberry Pi should automatically connect to your network.

You can check your network connection by running the following command:

ifconfig wlan0

==================================================================================

Sometimes the Raspberry Pi will not connect automatically and require a reboot to connect.

If it doesn’t connect after waiting 2-3 minutes try to reboot the pi using the following command:

sudo reboot