1.先执行ps查看,把默认启动的kill掉:
root@TinaLinux:/# ps
969 root 2312 S wpa_supplicant -iwlan0 -Dnl80211 -c/etc/wifi/wpa_sup
987 root 940 R ps
root@TinaLinux:/# kill -9 969
2.填入wifi信息
root@TinaLinux:/# vi /etc/wifi/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/etc/wifi/wpa_supplicant/sockets
update_config=1
network={
ssid=“wifi名”
psk=“密码”
}
3.连接wifi
root@TinaLinux:/# wpa_supplicant -B -c /etc/wifi/wpa_supplicant/wpa_supplicant.conf -i wlan0
root@TinaLinux:/# udhcpc -i wlan0