change resolv.conf


i just tried file resolv.conf only add nameserver, but i added nameserver and save file resolv.conf and reboot pc. The resolv.conf file remained unchanged after the reboot. The added nameserver was gone. :mad:

Please help me how to manually change resolv.conf file.

The only way I came was through yast2 in the network settings. I wrote them here and saved the change. But here you can add only 3 nameservers and I need 4. So I need to add one more.

Thanks for help

According to current documentation, resolver does not use more than 3 nameservers.

Thx for clarification.

Back to problem:

However, how to change the resolv.conf file manually without having to use yast2 to make the change take effect.


When you edit the file with an editor, I assume you can not avoid seeing:

### Please remove (at least) this line when you modify the file!

Dif you abide to that?

And, of course you should not let DHCP configure that file.

BTW, using YaST for it is only useful (maybe even only possible) when you use Wicked and not NM.

As far as I know, you will need to use Yast.

# ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 30 May 11 20:06 /etc/resolv.conf -> /var/run/netconfig/resolv.conf
# ls -l /var/run
lrwxrwxrwx 1 root root 4 May 11 19:50 /var/run -> /run

So “resolv.conf” is really in “/var/run/netconfig”. And “/var/run” is really “/run” which uses “tmpfs”. So any changes that you make to “resolv.conf” will go away on reboot.

By the way, this is a change from Leap 15.0, where “resolv.conf” was still an actual file in “/etc”.

I assume that you can still undo the link and have a real/fix /etc/resolv.conf But that should be tested first.

Here after an Update from Leap 15.0 to 15.1 it works with the old /etc/resolv.conf, but no dhcp.

stephan@hp-laptop:~> ls -la /etc/resolv.conf
-rw-r--r-- 1 root root 820 20. Apr 00:52 /etc/resolv.conf

Is there some reason why no one seems to be reading /etc/resolv.conf and actually following its instructions?
This has always worked for me…

# Before you change this file manually, consider to define the# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
# or disable DNS configuration updates via netconfig by setting: