Ubuntu 18.04操作系统常用

218 阅读1分钟

修改dns地址: vim /etc/netplan/xxx.yaml

# This is the network config written by 'subiquity'
network:
  ethernets:
    eno4:
      addresses:
      - 192.168.10.10/24
      gateway4: 192.168.10.1
      nameservers:
        addresses: [223.5.5.5,114.114.114.114]
  version: 2

重载配置:

netplan apply