每次重启后都修改DNS配置文件 /etc/resolv.conf
时间久了,真叫人抓狂
从网上得知 /etc/resolv.conf中的DNS配置是从/etc/resolvconf/resolv.conf.d/head中加载而来
于是,用nano或者其他编辑软件打开这个配置文件(建议用nano吧,上手容易)
    sudo nano /etc/resolvconf/resolv.conf.d/head
打开里面显示如下
  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
  # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

   意识是让你不要编辑这个文件,直接忽略
按照下面的格式输入你的DNS
    nameserver  xx.xx.xx.xxx
    nameserver  xx.xx.xx.xxx