莫名其妙的,ubuntu 无法访问外网。

ping www.taobao.com  www.baidu.com 提示无效的主机名

但是ping 外网ip 都是可以PING通的。

所以断定是 dns问题

 

 

解决:

sudo vi /etc/resolv.conf

nameserver 8.8.8.8    (谷歌DNS)

sudo /etc/init.d/networking restart

相关文章:

  • 2021-07-16
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
  • 2021-12-18
  • 2021-05-08
  • 2021-11-23
猜你喜欢
  • 2021-08-09
  • 2021-08-24
  • 2021-05-03
  • 2021-12-28
  • 2021-09-06
  • 2022-12-23
  • 2021-11-25
相关资源
相似解决方案