1.查看網(wǎng)卡名稱
#命令行
ip addr
1: enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
2: enp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
4: ...
說明:
#en : Ethernet 以太網(wǎng)卡(網(wǎng)線)
#sl : slip Serial Line IP:串行線路IP,是用于運(yùn)行TCP/IP的點(diǎn)對點(diǎn)串行連接.
#wl : wlan 無線局域網(wǎng)Wireless Local Area Network(WIFI)
#ww : wwan 無線廣域網(wǎng)WWAN
#o :主板板載網(wǎng)卡,集成是的設(shè)備索引號(hào)
#p :獨(dú)立網(wǎng)卡,PCI網(wǎng)卡
#s :熱插拔網(wǎng)卡,USB之類的擴(kuò)展槽索引號(hào)
2.配置interfaces
/etc/network/interfaces
#wifi自動(dòng)連接,網(wǎng)卡名:wlo1
auto wlo1
iface wlo1 inet dhcp
#WIFI信息配置文件地址
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
3.配置wpa_supplicant.conf (沒有就創(chuàng)建)
/etc/wpa_supplicant/wpa_supplicant.conf
# freq_list 優(yōu)先選擇頻道/頻率? 前面5G 后面2.4
network={
ssid="WIFI名字"
psk="WIFI密碼"
key_mgmt=WPA-PSK
freq_list=5745 5765 5785 5805 5825 5320 5300 5280 5260 5240 5220 5200 5180 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472
}
4.啟動(dòng)
ifup wlo1