wpa_supplicant

Some have the misconception that you can use wpa_supplicant.conf to scan and connect to networks. This defeats the purpose of wpa_supplicant, which is used to connect to ’secure’ networks (or networks you know won’t jeopardize your data).

Example /etc/wpa_supplicant.conf file:

network={
	ssid="myhomenetwork"
	key_mgmt=WPA-PSK
	psk="my_secret_password"
	prority=42
	}

network={
	ssid="college_network"
	key_mgmt=NONE
	priority=3
	}

What it means:
First network={ block connects to the network “myhomenetwork”, using WPA-PSK protocol (`man wpa_supplicant.conf’), and password “my_secret_password”, with priority ‘42′ (a higher priority than the default).

The second network={ block connects to “college_network”, an unsecured network, which has a priority of ‘3′, still higher than default. Priorities are useful if you connect to some networks regularly, but others not so frequently.