Ubuntu环境, 假设这台机器名字(hostname)叫abc, 每次执行sudo 就出现这个警告讯息:
sudo: unable to resolve host abc
虽然sudo 还是可以正常执行, 但是每次都有这个太烦

所以就直接从/etc/hosts 设定, 让abc(hostname) 可以解回127.0.0.1 的IP 即可.   

vim /etc/hosts

将图中打码位置换为机器的hostname即可

[linux]sudo 出现unable to resolve host 解决方法

 

修改hostname方法

https://blog.csdn.net/dufufd/article/details/75330423

https://blog.csdn.net/qq_42822962/article/details/85340312

相关文章:

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