Before configuring WiFi it is best to shut down other interfaces:
ifconfig eth0 down ifconfig usb0 down
Now let’s start WiFi:
ifconfig wlan0 up iw dev wlan0 scan | grep ssid -i
The last command will list the WiFi hot spots in range.
If a WiFi network uses WPA authentication the following commands will connect to it:
cd cp /etc/wpa_supplicant.conf . wpa_passphrase [SSID] [passphrase] >> ./wpa_supplicant.conf
Please insert the name of the WiFi network and the passphrase in the command above without quotes or the brackets.
Now connect to the WiFi network:
wpa_supplicant -B -Dnl80211 -iwlan0 -cwpa_supplicant.conf
The connection can be checked by:
iw dev wlan0 link
When connected to the network IP address can be requested by: