wget命令时报错:Name or service not known解决方法

ping www.baidu.com ping不通,报错
[root@localhost /]# ping www.baidu.com
ping: www.baidu.com: Name or service not known

按照这种方法,在/etc/resolv.conf文件首行加入namesever 8.8.8.8 保存并退出 就可以了
The DNS server seems out of order. You can use another DNS server such as 8.8.8.8. Put nameserver 8.8.8.8 to the first line of /etc/resolv.conf.

猜你喜欢

转载自blog.csdn.net/weixin_43919570/article/details/106864147