首页 > 其他 > 详细

Could not resolve host: www.baidu.com

时间:2019-10-12 11:56:11      阅读:131      评论:0      收藏:0      [点我收藏+]

发现linux突然访问不上网络,检查一看,原来是dns的问题,设置一下就好了

[root@localhost ~]# vim /etc/resolv.conf

[root@centos yum.repos.d]# cat /etc/resolv.conf 

# Generated by NetworkManager

# No nameservers found; try putting DNS servers into your

# ifcfg files in /etc/sysconfig/network-scripts like so:

#

# DNS1=xxx.xxx.xxx.xxx

# DNS2=xxx.xxx.xxx.xxx

# DOMAIN=lab.foo.com bar.foo.com

nameserver 114.114.114.114            #添加DNS

nameserver 8.8.8.8

 

Could not resolve host: www.baidu.com

原文:https://www.cnblogs.com/ushowtime/p/11660403.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!