如何防止登录后检查更新?

如何防止登录后检查更新?

每次我在虚拟机中登录 ubuntu 20.04 时,都需要一些时间才能出现提示。
这是登录期间的输出。输入密码后需要一段时间才能出现更新消息和 shell 提示。

Ubuntu 20.04.2 LTS ab21q-ubuntu-20 ttyAMA0

ab21q-ubuntu-20 login: ckim
Password: 
Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-77-generic aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 System information disabled due to load higher than 4.0

 * Super-optimized for small spaces - read how we shrank the memory
   footprint of MicroK8s to make it the smallest full K8s around.

   https://ubuntu.com/blog/microk8s-memory-optimisation

309 updates can be applied immediately.
199 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable


Last login: Sat Apr  2 00:36:22 KST 2022 on ttyAMA0
ckim@ab21q-ubuntu-20:~$ 

所以我猜检查更新花了这么多时间。我该如何阻止此更新检查?

答案1

您需要禁用“无人值守升级”守护进程。运行

sudo dpkg-reconfigure unattended-upgrades

...然后选择“否”。

PS:一般情况下,我不建议关闭自动更新,除非有特殊情况,比如当前的情况

请负责任地使用此答案,并且仅在必要时使用。

相关内容