Table of Contents
Change configuration of
If the configuration in
/etc/resolv.conf as below
Most likely the DNS configuration is controlled by
To confirm, run following command
lsof -i :53
ls -ld /etc/resolv.conf
/etc/resolv.conf directly, the file will be overwritten by
systemd-resolved again when next reboot, because the file
/etc/resolv.conf is a link as below.
lrwxrwxrwx 1 root root 39 Oct 5 2021 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
If recreate the file
/etc/resolv.conf, then it could be overwritten by
systemd-resolved when run service reconfiguration.
The configuration of
systemd-resolved is in
/etc/systemd/resolved.conf, it can be changed as below.