Unable to Update Resolve.conf

Hello! I’m currently unable to change the nameserver value in /etc/resolve.conf on my laptop that is running Fedora 30. I do have an internet connection since I’m able to ping

Even when I go into the network settings for the wireless and override the DNS settings to point to googles servers. DNS lookups are still not working.

My resolver.conf file contains the follwing configuration on my laptop.

# Generated by NetworkManager
search ad.somedoman.com

In comparison my desktop computer has the follwing

# Generated by NetworkManager
search fedoraz.internal


P.S. in solution remove the -r argument from the ln command.

You probably mean /etc/resolv.conf, not /etc/resolver.conf.
Make sure that is the only DHCP server in your network.
Every connection has its own DNS settings, so if you use more than one connection simultaneously, consider to utilize systemd-resolved which supports split-DNS mode:

sudo systemctl --now enable systemd-resolved.service
sudo ln -r -s -f /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
sudo systemctl restart NetworkManager.service
resolvectl --no-pager status

Woops, my bad. I’ll update the original post.

When I ran:

sudo ln -r -s -f /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

I was unable to create the symbolic link due to an Operation not permitted error. I did run as sudo. Even when I run as the root user the link command doesn’t work. ls -l outputs:

-rw-r--r-- root root 82 Jul 5 09:25 /etc/resolve.conf

Random thought but try dropping the -r, failing that try chattr -i /etc/resolv.conf just in case it somehow got marked as immutable.

EDIT: Btw if you’re on Silverblue, note that systemd-resolved breaks the toolbox networking.


Any reason to not just change settings in NetworkManager which handles all of this now? One can set nameservers and so on there.

1 Like

Removing the -r worked like a charm and the new file was linked over. Also, thanks mentioning chattr. I now know of a new command!

I don’t think I’m on Silverblue, but if I was how would I go about checking that?

If you don’t think you’re on Silverblue, you’re most likely not. :wink:


I can understand chattr, but what’s the problem with ln -r?
Fedora 30 Workstation, LVM partitioning by default, latest updates.
I can’t reproduce the issue and it’s confusing. :confused:

-r forces creation of a relative symlink, I honestly have no idea why it affected this but it stuck out as something different than most people use when creating symlinks for resolved.

I did try that, It wasn’t picking up the changes. :slightly_frowning_face:

Really? Then that would be a bug. NetworkManager and nm-connection-editor along with nmcli should be able to do all of this :thinking:

1 Like

It’s more likely the OP should be more careful because god only knows where they come from:

It must be neither /etc/resolver.conf, nor /etc/resolve.conf, but /etc/resolv.conf.