Solution to the problem of DNS configuration loss after Ubuntu 14.04 restart
Each time you modify the DNS configuration file/etc/resolv.conf, it will expire.
From the Web, this file is created dynamically, so each reboot will be rewritten, this file also has a warning:
So we can't modify this file directly.
There are two ways to check the data:
1)
2)
Vi/etc/resolvconf/resolv.conf.d/basenameserver 8.8.8.8nameserver 114.114.114.114
There are multiple lines of IP to write on one line.
Save when you are finished modifying.
Then execute:
Resolvconf-u
To view the head file:
Cat/etc/resolvconf/resolv.conf.d/head
This file is not loaded into base content as it is said online.
But after the reboot,
The contents of the/etc/resolv.conf are not changed to default values but are loaded into the data in base.
So that's it. The problem of DNS configuration loss after reboot has been successfully resolved.
Linux Learning Article---solution to the problem of DNS configuration loss after the Ubuntu 14.04 restart