症狀:linux
內核更新可能會因爲內核與驅動不匹配,致使系統無限重啓
方式一(apt命令):vim
#查看已安裝的內核 sudo dpkg --get-selections | grep linux #查看正在使用的內核 uname -r #使用apt命令禁止內核更新 sudo apt-mark hold linux-image-4.4.0-21-generic sudo apt-mark hold linux-image-extra-4.4.0-21-generic #重啓內核更新 sudo apt-mark unhold linux-image-4.4.0-21-generic sudo apt-mark unhold linux-image-extra-4.4.0-21-generic
方式二(修改配置文件):ide
# 修改如下文件 sudo vim /etc/apt/apt.conf.d/10periodic sudo vim /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"; #開啓自動更新 APT::Periodic::Update-Package-Lists "2"; APT::Periodic::Download-Upgradeable-Packages "1"; APT::Periodic::AutocleanInterval "0"; APT::Periodic::Unattended-Upgrade "1";