====== Ubuntu - etc - resolv.conf - Opting-out of NetworkManager ======
**NetworkManager** is by far the most common auto-configuration tool for the entire networking stack including DNS resolution.
It’s responsible for /etc/resolv.conf on many popular Linux distributions including Debian and Fedora.
After you’ve disabled all other programs that try to manage resolv.conf, you may also discover that NetworkManager will jump in to fill the job — as happens on Ubuntu 16.10 and later.
Set the dns option in the main configuration section to none to disable DNS handling in NetworkManager.
The below commands sets this option in a new conf.d/no-dns.conf configuration file, restarts the NetworkManager service, and deletes the NetworkManager-generated resolv.conf file.
echo -e "[main]\ndns=none" > /etc/NetworkManager/conf.d/no-dns.conf
systemctl restart NetworkManager.service
rm /etc/resolv.conf
If you discover that NetworkManager is still managing your resolv.conf, then you may have a configuration conflict (usually caused by dnsmasq).
Recursively search through your NetworkManager configuration to discover any conflicts.
grep -ir /etc/NetworkManager/
See [[Ubuntu:etc:resolv.conf:Recreating /etc/resolv.conf|Recreating /etc/resolv.conf]].