与你分享
互联网的方方面面

Debian11修改DNS

修改 /etc/systemd/resolved.conf

vim /etc/systemd/resolved.conf

添加或修改如下内容(取消注释并设置 DNS):

[Resolve]
DNS=8.8.8.8 1.1.1.1

启用并重启服务

systemctl enable systemd-resolved
systemctl restart systemd-resolved

创建 /etc/resolv.conf 的符号链接

ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

验证效果

resolvectl status

赞(0)
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
文章名称:《Debian11修改DNS》
文章链接:https://wph.im/285.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。