network:
version: 2
renderer: networkd
ethernets:
## 可以ip a查看以太网连接名称
eth0:
dhcp4: no
dhcp6: no
## addresses添加网络掩码,如192.168.56.3/24
addresses:
- 192.168.38.105/24
routes:
- to: default
via: 192.168.38.99
nameservers:
addresses:
- 223.5.5.5
- 1.1.1.1
# nano /etc/netplan/*** 文件名排序排在前面的有效
# sudo netplan try
# sudo netplan generate
# sudo netplan apply
标签:24,sudo,addresses,静态,IP,netplan,192.168,##,ubuntu
From: https://www.cnblogs.com/chasingdreams2017/p/17636196.html