Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How to permanently change DNS nameservers in Ubuntu 18.04.3? Wiki article is not working.
I am trying to permanently change the DNS nameserver being using on my droplet.
I following this article:
But the permanent fix option is not working.
The file “/etc/network/interfaces.d/50-cloud-init.cfg” does not exist.
And when I add nameservers to the file “/etc/network/interfaces” and restart the droplet, no change occurs. The file is saved, but the DNS server being used are still the default ones.
My “/etc/network/interfaces” file looks like the following:
auto lo iface lo inet loopback source /etc/network/interfaces.d/* dns-nameservers 18.104.22.168 22.214.171.124
Am I missing something? I am new to Linux.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×