配置方式
# cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
ens160:
dhcp4: false
addresses: [172.16.40.145/24]
optional: true
gateway4: 172.16.40.2
nameservers:
addresses: [10.10.58.2,223.6.6.6]
version: 2
注意:/etc/netplan/ 目录下 00-installer-config.yaml 文件名可能有所不同,根据自身系统文件名进行配置;
生效
netplan apply
标签:00,addresses,IP地址,netplan,ubuntu,installer,20.02,config
From: https://www.cnblogs.com/Star-Haitian/p/16657974.html