User Tools

Site Tools


ubuntu:etc:resolv.conf:identifying_which_utility_currently_controls_your_etc_resolv.conf

Ubuntu - etc - resolv.conf - Identifying which utility currently controls your /etc/resolv.conf

Several DNS-related programs want to automatically manage the DNS name server and resolution configuration file at /etc/resolv.conf.

There are quite a few different tools that fight to control a Linux system’s DNS resolution configuration file including /etc/resolv.conf including netconfig, NetworkManager, resolvconf, rdnssd, and systemd-resolved.

Most of these tools are oblivious to each other’s presence which can cause DNS resolution problems.


Identifying which utility currently controls your /etc/resolv.conf

head /etc/resolv.conf

returns:

# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the

NOTE: The first line here indicates that it is managed by systemd.

Some utilities don’t include a comment in the resolv.conf file, but you can identify these programs by checking for symbolic links with the following command:

ls -l /etc/resolv.conf

returns:

lrwxrwxrwx 1 root root 39 Aug  9  2019 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

As a last resort, you can check your init system to see if any of the programs mentioned in this article are running.

If you can’t identify any management programs using these methods, chances are you should be in control over the resolv.conf file and your system’s DNS resolution.

ubuntu/etc/resolv.conf/identifying_which_utility_currently_controls_your_etc_resolv.conf.txt · Last modified: 2020/07/15 09:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki