Ubuntu 18.04 ping 出现 Temporary failure in name resolution

Temporary failure in name resolution 错误解决方法:

vim /etc/resolv.conf

将里面的 nameserver 注释掉,尝试填写以下内容到文件中:

nameserver 114.114.114.114
nameserver 8.8.8.8

can not resovle host xxx 错误解决方法:

修改 /etc/hosts

sudo vim /etc/hosts
127.0.0.1 localhost
127.0.0.1 <your hostname>

References

posted @ 2021-02-18 16:11  五毛钱的饼  阅读(4603)  评论(0编辑  收藏  举报