1. 参照 ubuntu18.04.3,配置netplan相关yaml
network:
ethernets:
enp2s0:
dhcp4: true
wifis:
wlp8s0:
dhcp4: true
access-points:
"<ssid>":
password: "<passowrd>"
version: 2
2. 先连接有线网络,安装无线网络配置工具
sudo apt install net-tools wireless-tools network-manager
3. 连接WiFi
nmcli dev wifi connect <ssid> password <password>
4. 开启常用端口,避免被防火墙拦截
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https