Hi!
OS Fedora 39
I have a desktop computer connected to the router via a wired connection. On Fedora, the DNS is set to the router’s IP. How can I change the DNS to a different IP from the command line? The resolv.conf file gets overwritten upon restart.
I tried to change to change DNS in
/etc/systemd/resolved.conf
Than, i write in file /etc/NetworkManager/conf.d/10-dns-systemd-resolved.conf
The file that it points to gets created with each boot/reboot, but /etc/resolv.conf is not changed.
If you were to remove that symlink and create your own file there it would remain unchanged in the future.
The above suggestion that you marked as the solution is the better choice though.