ubuntu中 ping: www.baidu.com: Temporary failure in name resolution
001、问题
root@ubuntu01:/home# ping www.baidu.com ## 测试网络连通性, 无法解析域名 ping: www.baidu.com: Temporary failure in name resolution
002、修改DNS配置文件
root@ubuntu01:/home# vim /etc/resolv.conf ## 修改配置文件 nameserver 127.0.0.53 options edns0 trust-ad search . nameserver 8.8.8.8 ## 在文件末尾追加这句,保存退出 :wq!
003、测试网络连通性
root@ubuntu01:/home# ping www.baidu.com PING www.a.shifen.com (110.242.68.3) 56(84) bytes of data. 64 bytes from 110.242.68.3 (110.242.68.3): icmp_seq=1 ttl=128 time=12.7 ms 64 bytes from 110.242.68.3 (110.242.68.3): icmp_seq=2 ttl=128 time=19.6 ms ^C --- www.a.shifen.com ping statistics --- 3 packets transmitted, 2 received, 33.3333% packet loss, time 2004ms rtt min/avg/max/mdev = 12.692/16.129/19.566/3.437 ms