Hm. So then don't use (systemd-)resolved? Alternatively, I've accepted that it's built to work with a decades-old ecosystem and that resolv.conf is effectively a generated, read-only-except-resolved file. And in turn, resolved's configuration is perfectly static and equally immutable. /shrug
My* only problem is that it's pretty good at what it does, and can be... more helpful than you might like at providing consistent global DNS resolution. For example, it's use over dbus makes processes in `netns`s susceptible to leaking DNS requests. Though arguably I should've been going more full-containery than just a netns maybe, given my expectations.
The number of ways and things that twiddle with /etc/resolv.conf nowadays is quite unreasonable.
Changing the IP address was also fairly simple in editing a file, but now there's networkd sometimes, and NetManager other times, and netplan too, and perhaps make sure your YAML file is indented with the right number of spaces in the right place…
> The number of ways and things that twiddle with /etc/resolv.conf nowadays is quite unreasonable.
In many years of daily-driving unix-likes and being an amateur and professional sysadmin, I think resolv.conf is the only time I've ever actually used `chattr +i`.
My* only problem is that it's pretty good at what it does, and can be... more helpful than you might like at providing consistent global DNS resolution. For example, it's use over dbus makes processes in `netns`s susceptible to leaking DNS requests. Though arguably I should've been going more full-containery than just a netns maybe, given my expectations.