$ cd /etc/netplan/ $ ls 50-cloud-init.yaml $ sudo vim 50-cloud-init.yaml network: ethernets: ens33: addresses: [10.10.10.101/24] gateway4: 10.10.10.1 dhcp4: no nameservers: addresses: [114.114.114.114] version: 2 $ sudo netplan apply 注:如有多个IP和DNS时,中间使用逗号分隔
原创文章,作者:KICXP,如若转载,请注明出处:http://www.wangzhanshi.com/n/13877.html