美文网首页
ubuntu20.04 ubuntu18.04 修改网络配置

ubuntu20.04 ubuntu18.04 修改网络配置

作者: 8589068464bc | 来源:发表于2020-12-25 18:32 被阅读0次

[参考链接] (https://www.techrepublic.com/article/how-to-set-dns-nameservers-in-ubuntu-server-18-04/)

装了ubuntu20.04,修网修改dns,百度了一下,中文网站的方法都不对,最后还是google出来的。

修改网络配置文件:

sudo vim  /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    enp0s3:
      addresses:
      - 192.168.2.51/24
      gateway4: 192.168.2.1
      nameservers:
        addresses:
        - 192.168.2.1
  version: 2

再执行

sudo netplan apply

设置完成

相关文章

网友评论

      本文标题:ubuntu20.04 ubuntu18.04 修改网络配置

      本文链接:https://www.haomeiwen.com/subject/cxeinktx.html