ubuntu18.04 使用netplan配置静态IP
1.cd /etc/netplan
2.sudo vim /etc/netplan/*.yaml
network:
ethernets:
enp0s3:
dhcp4: false
addresses: [192.168.10.45/24] #静态IPv4
gateway4: 192.168.10.255 #网关
nameservers:
addresses: [119.29.29.29] #DNS地址
version: 2