obgr_seneca wrote:What about opening the network center in the mcc and setting the dns manually?
Because it doesn't address the issue. You only get to choose between static and dynamic allocation. The matter at hand deals with how to change your resolver to use Google DNS on a DHCP client.
obgr_seneca wrote:But of course you can choose a more difficult way as well

Yes you could, but why would you? And that's why I showed the simple way to do this.
Regarding the later responses above that suggest making the file immutable w/chattr, yes, you can do that too, but I would caution against "Setting it and forgetting it". If you know that wherever you go, that's the way you want the file to be, then yes, go ahead, I would feel more comfortable using either
dhclient or the
/etc/resolv.conf.head and
/etc/resolv.conf.tail files I mentioned above, which are designed precisely for this very purpose.
Valid entries in /etc/resolv.conf also include
*search*, and
*domain* directives, but those are outside the scope of the OP's question, and further, "
OpenDNS" is NOT a valid entry. I suspect that what viking60 intended was to have that line read "
# OpenDNS nameservers"
Manipulating /etc/resolv.conf is indeed the quickest and easiest way to affect the use of Google DNS, and chattr will lock it for you (but you might forget you did that when/if it causes a problem at a WiFi hotspot that enforces a captive portal system for initial permission to surf the Internet),
I recommend the following read which will show you how to set up your machine to accept a dynamic IP address, while allowing you to keep your hostname/domain of choice, and choose the DNS servers that you prefer:
https://calomel.org/dhclient.htmlI hope that helps

Kindest regards,
.