In simple terms, WPA Supplicant is a free package that helps the wireless driver to connect, authenticate with different known stations around you. As the name suggests, WPA Supplicant is the IEEE 802.1X/WPA component designed to implement critical negotiations between WPA Authenticator and control the roaming of IEEE 802.11 wireless driver’s authentication and association. Note: Be sure to cross check the name of the wireless you want to reset.Īs soon as you perform this, you will be connected to the Wi-Fi network mentioned in previous steps.īut, before we end this blog, it’s important to talk about what is wpa_supplicant we just played around with. Once you complete this step, you can either restart the Raspberry Pi or execute the following commands: #Restarting wireless interface You can check the correct name by executing the ifconfig command on Raspberry Pi terminal. For example, some systems name your Wi-Fi network interface as wlan0 another call it wlan1, wlan2, etc. Following is the content you can directly copy and paste, however, be sure to have the correct names in place.
Editing Interfaces File:Īfter this step, we will also need to make some changes in the interface file located in the /etc/network/ directory. For Nano editor, press Control + O hit Return and then Control + X to exit. Now depending on the editor, you used to edit the files, enter commands to save and quit. For example, in the following sample, the network with name Home will have more priority over the network Home2. If you want to prioritize the connection between two or more authorized networks in range, then you can use priority tag and assign a number to it. Following is the accepted format and can be copy-pasted after replacing SSID and PSK with correct values.Ĭtrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev This file is going to contain information regarding your Wi-Fi networks such as its SSID and password. Once inside the Raspi, we will have to edit a file residing in /etc/wpa_supplicant/ directory using the following command.
Once done, enter username and password to connect over SSH.
On Windows PC, fire up the PuTTy program, enter the details in the respective fields and click Open. If you are unaware of the login credentials, then those can be found on the website from where you downloaded your operating system. Say yes to the fingerprint and enter the password to log in. Now to log in into the Raspi, on Linux/Unix OS, all you have to do is open the terminal and enter the following command $ssh Where IP address is the IP you got from the router admin UI or Nmap scans, and username is the user existing in the operating system. Moving further, we will need to find the IP address assigned to the Raspi using either the router admin UI or scanning the range of the IPs using utilities like Nmap. However, on some operating systems, such as Raspbian, SSH isn’t enabled by default and can be activated by writing a file named ssh without any extension or content on the SD card. Windows users can use PuTTy, where Unix/Linux based operating systems come loaded with a pre-installed version of SSH. To perform any changes on your Raspberry Pi, we will need an SSH connection. Now, boot up your Raspberry Pi 3 using the micro USB as a power source with a LAN cable connected to the port available on Pi.
How to connect to Wi-Fi on Raspberry Pi using Command Line: Basic Set-up:įirst of all, you need to have is a Linux-based Raspi supported operating system – preferrable Ubuntu/Debian based OS – installed on your SD card.