netplan.io 实在是太烂了
假设 IPv4 地址是 AAA.BBB.CCC.DDD,修改 /etc/netplan/01-netcfg.yaml
# Network configuration file # Auto generated by Ikoula network: version: 2 renderer: networkd ethernets: eth0: dhcp4: no addresses: - AAA.BBB.CCC.DDD/24 - "2a00:c70:1:AAA:BBB:CCC:DDD:1/96" gateway4: AAA.BBB.CCC.1 gateway6: 2a00:c70:1:AAA:BBB:CCC::1 nameservers: addresses: [213.246.36.14,213.246.33.144,80.93.83.11]
之后 netplan try 验证格式并回车应用,或者直接 netplan apply