How to use resolvconf?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
jasonnix
Posts: 30
Joined: 2023-12-04 11:30
Has thanked: 2 times

How to use resolvconf?

#1 Post by jasonnix »

Hello,
I installed resolvconf. I added the following file and put the DNS in it:

Code: Select all

# nano /etc/resolvconf/resolv.conf.d/head
nameserver IP 
nameserver IP
Then:

Code: Select all

# /sbin/resolvconf --enable-updates
# systemctl restart resolvconf
# /sbin/resolvconf -u
After it, I have duplicate address in /etc/resolv.conf file. Why?

Thank you.

friendlysalmon88
Posts: 102
Joined: 2023-12-08 16:48
Location: Seattle,Wa USA
Has thanked: 6 times
Been thanked: 7 times

Re: How to use resolvconf?

#2 Post by friendlysalmon88 »

What release of Debian are you operating on? The reason that I ask this question is that I've never come accessed the procedure that you mention above however, I haven't run Linux as a server os for quite some years so I may be out of the loop on the goings on in the use of Debian as an infrastructure operating system.

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2259
Joined: 2010-06-07 16:59
Has thanked: 43 times
Been thanked: 238 times

Re: How to use resolvconf?

#3 Post by FreewheelinFrank »

A cursory glance suggests the answer to your question may already be in the Debian Wiki:
Ordinarily, the resolv.conf(5) file is managed dynamically by various network service daemons. This is the default, and is intended for laptops and other highly mobile systems which may connect to different networks. It also works well for many desktop and server systems, so long as the network infrastructure is perfect.

For some systems, on some networks, the system administrator may wish to configure /etc/resolv.conf by hand. This leads to a conflict between the administrator's changes, and the dynamic changes performed by the network service daemons.

If you edit resolv.conf by hand, and need to stop daemons from overwriting your changes, this page documents some of your options.
https://wiki.debian.org/resolv.conf

As with all questions, some context would be useful: why do you want or need to manually edit this file, what is your setup, and what do you hope to achieve by the addition that is nor happening already?

Post Reply