参考 ubuntu系统上systemd-resolved不使用127.0.0.53的方法
先修改/run/systemd/resolve/resolv.conf
的内容,填自定义的dns服务器。
然后将软连接强制指向他:
ln -s -f /run/systemd/resolve/resolv.conf /etc/resolv.conf
systemctl daemon-reload && systemctl restart systemd-resolved.service && systemctl status -l systemd-resolved.service --no-pager
cat /etc/resolv.conf
还有参考 Ubuntu 20.04设置DNS解析(解决resolve.conf被覆盖问题),要修改/etc/systemd/resolved.conf
,添加DNS字段
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)