Lxn-Chan!

(~ ̄▽ ̄)→))* ̄▽ ̄*)o

Ubuntu 禁用系统更新,一是防止不清楚内容的更新对生产环境产生影响,二是也减少系统重启次数,保证业务不中断。

本文全程在root环境下操作,非root环境或无法使用root登录请自动添加sudo

System restart required

Ubuntu通过在/var/run下面生成reboot-required文件来提醒用户需要重启,具体哪些软件/包/更新需要重启可以查看/var/run/reboot-required.pkgs文件内容。

内核更新

禁止:

1
apt-mark hold linux-base linux-image-generic linux-headers-generic libssl1.1

允许:

1
apt-mark unhold linux-base linux-image-generic linux-headers-generic libssl1.1

Desktop版本还有Snap套件管理工具(Ubuntu软件商店,在大天朝基本没什么用),也可以一并禁用掉

1
2
systemctl disable {snapd,snapd.socket,snapd.refresh.timer}
systemctl stop {snapd,snapd.socket,snapd.refresh.timer}

禁用apt自动更新

编辑文件/etc/apt/apt.conf.d/20auto-upgrades

1
2
3
# 1改成0即可屏蔽更新
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

 简单说两句



联系站长 | 服务状态 | 友情链接

备案号:辽ICP备19013963号

萌ICP备 20219421 号

中国互联网违法和不良信息举报中心

架构版本号:8.1.5 | 本站已全面支持IPv6

正在载入运行数据(1/2)请稍后...
正在载入运行数据(2/2)请稍后...

Copyright 2024 LingXuanNing, All rights reserved.