美国vps的ubuntu如何关闭内核自动更新

已关闭留言

美国vpsubuntu关闭内核自动更新的方法:

1、使用快捷键【Ctrl+Alt+T】打开终端;

2、输入以下命令打开/etc/apt/apt.conf.d/10periodic配置文件。

sudo gedit /etc/apt/apt.conf.d/10periodic

禁止自动更新配置文件设为如下:

APT::Periodic::Update-Package-Lists “0”;

APT::Periodic::Download-Upgradeable-Packages “0”;

APT::Periodic::AutocleanInterval “0”;

APT::Periodic::Unattended-Upgrade “0”;

再输入命令打开/etc/apt/apt.conf.d/20auto-upgrades配置文件。

sudo gedit /etc/apt/apt.conf.d/20auto-upgrades

再设置禁止自动更新。

APT::Periodic::Update-Package-Lists “0”;

APT::Periodic::Download-Upgradeable-Packages “0”;

APT::Periodic::AutocleanInterval “0”;

APT::Periodic::Unattended-Upgrade “0”;

3、设置完成后,输入以下命令重启ubuntu系统使其生效即可。

reboot