root@myir-yg2lx:~# ifconfig wlan0
wlan0: flags=4098<BROADCAST,MULTICAST> mtu 1500 metric 1
ether 68:4e:05:b3:ff:f2 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
妥妥的三种上网方式都已经成功
使能开机自动连wlan
root@myir-yg2lx:~# systemctl enable wpa_supplicant@wlan0.service
Created symlink /etc/systemd/system/multi-user.target.wants/wpa_supplicant@wlan0.service → /lib/systemd/system/wpa_supplicant@.service.
开机wifi自动获取到IP
root@myir-yg2lx:~# vi /etc/systemd/network/11-wlan0.network
root@myir-yg2lx:~# cat /etc/systemd/network/11-wlan0.network
[Match]
Name=wlan0
[Network]
DHCP=yes
[DHCP]
RouteMetric=20
更多回帖