"resolv.conf" not saved.

New to Debian (Or Linux in general)? Ask your questions here!

"resolv.conf" not saved.

Postby hack3rcon » 2020-09-21 10:16

Hello,
I edited "resolv.conf" file and added some servers to it and save the file, but when I reboot the system, my configuration lost.
Why?

Thank you.
hack3rcon
 
Posts: 445
Joined: 2015-02-16 09:54

Re: "resolv.conf" not saved.

Postby sickpig » 2020-09-21 10:40

hack3rcon wrote:Why?

The first 2 lines of /etc/resolv.conf will tell you who or what populated it.
User avatar
sickpig
 
Posts: 575
Joined: 2019-01-23 10:34

Re: "resolv.conf" not saved.

Postby hack3rcon » 2020-09-24 13:28

sickpig wrote:
hack3rcon wrote:Why?

The first 2 lines of /etc/resolv.conf will tell you who or what populated it.

What does it mean? I solved this problem with an extra program but I wanted to know how can I do it without third-party.
hack3rcon
 
Posts: 445
Joined: 2015-02-16 09:54

Re: "resolv.conf" not saved.

Postby sickpig » 2020-09-24 19:37

what is the output of
Code: Select all
cat /etc/resolv.conf
User avatar
sickpig
 
Posts: 575
Joined: 2019-01-23 10:34

Re: "resolv.conf" not saved.

Postby p.H » 2020-09-26 06:45

hack3rcon wrote:What does it mean?

It means that you should cooperate with the program which created resolv.conf if you want to add persistent entries.
Typically NetworkManager, resolvconf, dhclient...
Or install resolvconf if not installed and hope that the above program (such as dhclient and NetworkManager) cooperates with it.

In any case, do not set the file immutable with chattr. It may have issues or even be uneffective if /etc/resolv.conf is a symlink pointing to a tmpfs.
p.H
 
Posts: 1489
Joined: 2017-09-17 07:12


Return to Beginners Questions

Who is online

Users browsing this forum: stevepusser and 9 guests

fashionable