Ubuntu Server Change DNS Name Servers
Synonyms:
Sometimes, the default DNS is not stable enough. To change the name servers to 8.8.8.8, the official solution is to modify /etc/network/interfaces. But NO, I will never modify this file again, since I have made servers offline many times because of modifying this file incorrectly.
dnsmasq
Clint Eastwood gives a solution by installing dnsmasq.