虚拟机里的Ubuntu sudo时卡住

https://serverfault.com/questions/38114/why-does-sudo-command-take-long-to-execute

今天装了一个虚拟机,其他都很快,但是执行sudo的时候却非常的卡,要等好几秒钟,搜了一下,是这么个解决法,把主机名加到 /etc/hosts 里,原因是安装过程中,hostname没有追加到 /etc/hosts 里。

那么为什么sudo要读取 /etc/hosts 呢?原因在这里:https://superuser.com/questions/429790/sudo-command-trying-to-search-for-hostname


更多文章
  • Golang中的并发控制
  • 善用闭包(closure)让Go代码更优雅
  • Golang的可选参数实践
  • FreeBSD ipfw使用教程
  • Golang expvar库源码阅读
  • Golang SQL生成库 Squirrel 教程及源码阅读
  • Golang validator使用教程
  • 价值编程与职业发展
  • 使用Redis的Stream模块实现群聊功能
  • 解决k8s cron无法读取环境变量的问题
  • 应用内购的坑
  • 两种常见的访问控制模型
  • gunicorn max-requests 选项的作用
  • Redis使用中的几点注意事项
  • 给你的代码跑个分?pylint使用教程