虚拟机里的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


更多文章
  • 价值编程与职业发展
  • 解决k8s cron无法读取环境变量的问题
  • 应用内购的坑
  • 两种常见的访问控制模型
  • gunicorn max-requests 选项的作用
  • Redis使用中的几点注意事项
  • 给你的代码跑个分?pylint使用教程
  • 一个Gunicorn worker数量引发的血案
  • MySQL Boolean类型的坑
  • pip freeze是魔鬼
  • 一个feed流系统的演进
  • Android 使用view binding
  • 系统调用的过程
  • MySQL charset不同导致无法使用索引的坑
  • 微服务的缺点