加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

Ubuntu 报错 sudo: unable to resolve host xxxx 解决方法

发布时间:2020-12-13 17:54:40 所属栏目:Linux 来源:网络整理
导读:在开启ubuntu系统的80端口时提示错误如下: root@x:~/web#?sudo?ufw?allow?80sudo:?unable?to?resolve?host?xSkipping?adding?existing?ruleSkipping?adding?existing?rule?(v6 解决方法如下: ?打开hostname文件,把名字复制下来 打开hosts文件,在localhos

在开启ubuntu系统的80端口时提示错误如下:

root@x:~/web#?sudo?ufw?allow?80
sudo:?unable?to?resolve?host?x
Skipping?adding?existing?rule
Skipping?adding?existing?rule?(v6

解决方法如下:

  1. ?打开hostname文件,把名字复制下来

  2. 打开hosts文件,在localhost后面加一个空格 把名字复制进去就可以了

vim?/etc/hostname
iZm5ej12y174lo14r36fvlZ

vim?/etc/hosts
127.0.0.1???????localhost?iZm5ej12y174lo14r36fvlZ



(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读