News for hackers. Stuff that matters.
Re:How to take back control of /etc/resolv.conf on Linux (2018) by usr1106 on Thursday March 21, 2019 @03:55AM (#19449952)
man systemd-resolved :)

Systemd-resolved has a configuration compiled in. If thats not what you want you can edit /etc/systemd/resolved.conf. It shows what has been compiled in as comments. Actually really editing any systemd configuration or unit file is typically a bad idea. Configuration changes are done preferrably by drop-ins. These are little files to be stored under /etc/systemd/resolved.conf.d/{foo,bar}.conf (Pathnames from memory, typing on my phone, but you should be able to see the naming scheme used. It's quite systematic all over systemd.)

Roughly it works like that (not sure whether distros vary):

primary DNS server address is received from DHCP at runtime

fallback DNS servers are hardwired in the config. I remember at least seeing google 8.8.8.8 there

You can change the primary DNS server not to be set by DHCP, that's probably the first thing may people want to do.

There are no comments on this comment yet.