About Wpa_supplicant:
Use the WPA_CLI command.
Wpa_cli-iwlan0 add_network//Wlan0 is the name of the wireless network device, and adding a network will return a number, assuming 1
Wpa_cli-iwlan0 set_network 1 SSID ' ... '//Here The SSID is the network name to be connected, note that the following is a single quote + double quotation mark
Wpa_cli-iwlan0 set_network 1 PSK ' "..." '//Here PSK is the password
Wpa_cli-iwlan0 Enable_network 1
Wpa_cli-iwlan0 Select_network 1
Wpa_cli-iwlan0 Save_config
Dhclient-r Wlan0
Dhclient Wlan0
Note that it is possible that the wlan0 is down and sometimes requires ifconfig wlan0 up
or/etc/init.d/networking restart.
Other auxiliary commands
Wpa_cli-iwlan0 List_network
Wpa_cli-iwlan0 Remove_network 1
Open Wpa_supplicant Service
Wpa_supplicant-iwlan0-c/etc/wpa_supplicant.conf-b
Encryption method
Wpa_passphrase SSID PSK >/etc/wpa_supplicant.conf//This file can be changed
Not yet fully aware of the content
Ctrl_interface =/var/run/wpa_supplicant
Update_config =1
Summary Linux Wireless command WPA