ctrl_interface=/var/run/wpa_supplicant
update_config=1
network={
ssid=”Sunny-xx”
#psk=””
psk=
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}
wpa_passphrase ssid pwd
# sudo vim /etc/network/interfaces
auto wlan0
iface wlan0 inet dhcp
wpa-conf /root/tools/wlanconf/wifi.conf
启动无线连接
# sudo wpa_supplicant -B -i wlan0 -D wext -c /root/tools/wlanconf/wifi.conf--/root/tools/wlanconf/wifi.conf 为wifi.conf的路径
# sodu iwconfig wlan0
自动获取IP
# sudo dhclient wlan0
转载于:https://www.cnblogs.com/sunnykwan/p/11565660.html