dhcp
# This is the network config written by 'subiquity'
network:
ethernets:
ens160:
dhcp4: true
version: 2
静态配置
root@ubuntu:~# cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
ens160:
dhcp4: false
addresses:
- 192.168.77.12/24
nameservers:
addresses:
- 192.168.77.8
routes:
- to: default
via: 192.168.77.1
version: 2
生效
netplan apply