Ubuntu 在每次执行命令的时候,会报如下错误:

$ sudo
sudo: unable to resolve host iZ2zecsdy8flu603bmdg1bZ

iZ2zecsdy8flu603bmdg1bZ是阿里云创建服务器默认的hostname,错误其实没有什么影响,但看起来很不爽,解决方式:

$ vim /etc/hostname
iZ2zecsdy8flu603bmdg1bZ
$ vim /etc/hosts
127.0.0.1       localhost iZ2zecsdy8flu603bmdg1bZ

结尾处增加hostname

相关文章:

  • 2021-09-29
  • 2021-09-19
  • 2021-11-28
  • 2022-12-23
  • 2021-05-07
  • 2022-02-20
猜你喜欢
  • 2022-12-23
  • 2021-07-11
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案