Ubuntu 12.04 lost DNS configuration after reboot

http://bbs.pcbeta.com/forum.php?mod=viewthread&tid=1054491

It takes a long time to modify the DNS configuration file /etc/resolv.conf after each restart, which is
really frustrating
. I learned from the Internet that the DNS configuration in /etc/resolv.conf is from /etc/resolvconf/resolv.conf.d It is loaded from /head,
so use nano or other editing software to open this configuration file (it is recommended to use nano, it is easy to get started)
    sudo nano /etc/resolvconf/resolv.conf.d/head
opens it and displays the following
  # 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

   The awareness is to let you not edit this file, just ignore
entering your DNS in the following format
    nameserver xx.xx.xx.xxx
    nameserver xx.xx.xx.xxx
restart it, try it, is it okay?

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326687130&siteId=291194637