identify and give birth to your wireless interface
#rfkill list ifconfig -a iwconfig ifconfig wlan0 up
have a look at the existing SSIDs around
iwlist wlan0 scan | grep -v "IE: Unknown:" iwlist wlan0 scan | grep SSID | sort -u iwlist wlan0 scan | egrep 'Cell|SSID|Signal|Channel|802\.11' | less wpa_cli -i wlan0 scan_results
now look more precisely what kind of authentication they want
iwlist wlan0 scan | less
e.g. you might see WPA-PSK/TKIP
IE: WPA Version 1 Group Cipher : TKIP Pairwise Ciphers (1) : TKIP Authentication Suites (1) : PSK
or WPA2-EAP/CCMP
IE: IEEE 802.11i/WPA2 Version 1 Group Cipher : CCMP Pairwise Ciphers (1) : CCMP Authentication Suites (1) : 802.1x
or non-protected and open network
Encryption key:off
no need for WPA supplicant here
iwconfig wlan0 essid SSID-HERE #bssid MAC-ADDRESS
IEEE 802.11 Wireless Networks http://www.vias.org/wirelessnetw/wndw_05_04.html
HakTip 9 – WiFi 101: The 6 Modes of Wireless https://www.hak5.org/episodes/haktip-9
Connecting to a wireless network (open and protected) from terminal https://superuser.com/questions/1119937/connecting-to-a-wireless-network-open-and-protected-from-terminal
Connecting to wifi network through command line https://unix.stackexchange.com/questions/92799/connecting-to-wifi-network