查看网关 route -n 查看使用的etc名字 ip a 配置ip network: version: 2 renderer: networkd ethernets: eth0: dhcp4: no dhcp6: no addresses: [xxxxxxx/24] optional: true gateway4: xxxxxxxx 重启 sudo netplan apply