Raspberry Pi 4B + Ubuntu 20.04 server for arm64 的wifi配置

1、查看网口

ip a

看到 eth0 lo wlan0等

2、进入 /etc/netplan/ ,复制备份内部现存的*.yaml文件,编辑原文件

network:
    version: 2
    ethernets:
        eth0:
            optional: true
            dhcp4: true
    
    wifis:
        wlan0:
            optional: true
            dhcp4: true
            access-points:
                "无线网名称":
                    password: "无线密码"    

3、 执行 sudo netplan --debug try 测试配置

    如果出错,执行 sudo netplan --debug generate 查看更多信息

ping www.baidu.com //是可以ping 通的

    如果没出错,执行 sudo netplan --debug apply 应用配置

ping www.baidu.com //是可以ping 通的

4. 如果没问题,重启应该就好了