ubuntu server连接WiFi

sudo vim /etc/netplan/50-cloud-init.yaml

在文件末尾增加语句(如果有直接修改)

network:
  version: 2
  wifis:
    wlan0:
      access-points:
        "WIFI名称": 
           password: "密码"
      dhcp4: true
      optional: true

之后保存退出,在命令行输入命令

sudo netplan generate
sudo netplan apply
posted @ 2021-02-17 16:59  LightningStar  阅读(547)  评论(0编辑  收藏  举报