停用 systemd-resolved 服务防止53端口占用
先停止该服务 sudo systemctl stop systemd-resolved
编辑 /etc/systemd/resolved.conf 文件中[Resolve] 部分为下面代码
[Resolve]
DNS=8.8.8.8
DNSStubListener=no
最后创建修改文件链接
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
先停止该服务 sudo systemctl stop systemd-resolved
编辑 /etc/systemd/resolved.conf 文件中[Resolve] 部分为下面代码
[Resolve]
DNS=8.8.8.8
DNSStubListener=no
最后创建修改文件链接
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf