[Linux] Ubuntu 19.10 server 配置静态IP

2020-02-11 18:38:46 浏览数 (1)

cat /etc/netplan/50-cloud-init.yaml

代码语言:javascript复制
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: false
      addresses: [192.168.1.102/24]
      gateway4: 192.168.1.1
      nameservers:
              addresses: [192.168.1.1, 8.8.8.8]

应用

netplan --debug apply

0 人点赞