cd /etc/netplan2.删除 00-installer-config.yaml 文件 3.新建 static.yaml (静态IP配置)
# This is the network config written by 'subiquity'
network:
ethernets:
ens33:
addresses: [192.168.21.85/24]
gateway4: 192.168.21.1
nameservers:
addresses: [192.168.21.1,114.114.114.114]
version: 2
4.新建 dhcp.yaml(动态IP配置)
# This is the network config written by 'subiquity'
network:
ethernets:
ens33:
dhcp4: true
version: 2
5.检查
sudo netplan apply --debug6.查看
ip a



