Easiest method
- To get the wireless interface:
iwconfig - (Optional) If it is not up enable it:
sudo ifconfig wlan0 up - Scan for SSID:
sudo iwlist wlan0 scan | grep ESSID - Create wpa_supplicant file (can wrap ESSID in double quotes if got space). If passphrase got special character just run
wpa_passphrase your-ESSIDand enter password manually:
wpa_passphrase your-ESSID your-passphrase | tee test_network.conf - Connect to it:
sudo wpa_supplicant -c test_network.conf -i wlan0 - Confirm it is working with:
iwconfig - End the process and connect it in background:
sudo wpa_supplicant -B -c test_network.conf -i wlan0 - Obtain D:
sudo dhclient wlan0
Open Network
network={
ssid="hotel_wifi"
scan_ssid=1
}
WEP
network={
ssid="Your_WEP_SSID"
key_mgmt=NONE
wep_key0="yourwepkey"
}
WPA/WPA2
Optional to add pairwise=CCMP or pairwise=TKIP
network={
ssid="home_network"
scan_ssid=1
psk="correct battery horse staple"
key_mgmt=WPA-PSK
}