vi /etc/systemd/resolved.conf
将resolved.conf内容中的 #dns= 改为 dns8.8.8.8
保存后 ,继续执行以下命令,逐行复制并执行
systemctl restart systemd-resolved
systemctl enable systemd-resolved
mv /etc/resolv.conf /etc/resolv.conf.bak
ln -s /run/systemd/resolve/resolv.conf /etc/
cat /etc/resolv.conf #查看dns文件再次PING 域名,就会发现正常了。
Copyright © 2013-2024 8a.hk All Rights Reserved. 八艾云 版权所有 中山市八艾云计算有限公司 粤ICP备14095776号 粤公网安备 44200002445359号
增值电信业务经营许可证编号:B1-20222012
代理域名注册服务机构:西部数码