如何更换我的 DNS?我不使用网络管理员,除了systemd-networkd
和wpa_supplicant
无线,带wpa_cli
。如果重要的话,我在 Arch Linux 上。
尽管我可以将 DNS 添加到我的配置中、systemctl restart systemd-resolved
覆盖/etc/resolv.conf
(符号链接到/run/systemd/resolve/resolv.conf
)或重新启动,但以某种方式将默认的 ISP DNS 添加到/etc/resolv.conf
. 有谁知道为什么,或如何解决此问题以仅使用我配置的 DNS?
当我编辑/etc/resolv.conf
为只包含
nameserver 208.67.222.222
nameserver 208.67.220.220
Run Code Online (Sandbox Code Playgroud)
并运行systemctl restart systemd-resolved
或重新启动,默认的 ISP DNS 被覆盖,cat /etc/resolv.conf
是这样的:
# This file is managed by systemd-resolved(8). Do not edit.
#
# Third party programs must not access this file directly, but
# only through the symlink at /etc/resolv.conf. To manage
# resolv.conf(5) …
Run Code Online (Sandbox Code Playgroud)