阿里云轻量服务器ubuntu一直报错 unable to resolve host xxxxxxxx的解决的方案

1.切换到root

sudo su root

2.修改/etc/hosts文件:

sudo vi /etc/hosts

3.在127.0.0.1       localhost下面添加

127.0.0.1 localhost 报错的主机名

4.按Esc,输入

:wq

保存文件并退出。

博客参考:

https://yq.aliyun.com/articles/495245

https://blog.csdn.net/hhtnan/article/details/79551969

https://blog.csdn.net/feosun/article/details/73196299

发布了188 篇原创文章 · 获赞 62 · 访问量 18万+

猜你喜欢

转载自blog.csdn.net/Code_7900x/article/details/88698074