禁止 Ubuntu 自動更新 kernel

軟體 & 更新

查看目前使用的 kernel (5.15.0-37)

bash
1
uname -a

查看所有已安裝的 kernel

bash
1
dpkg -l | grep linux

固定特定版本的 kernel (5.15.0-37)

bash
1
2
3
4
5
sudo apt-mark hold linux-headers-5.15.0-37 \
linux-headers-5.15.0-37-generic \
linux-image-5.15.0-37-generic \
linux-modules-5.15.0-37-generic \
linux-modules-extra-5.15.0-37-generic

查看已固定的 kernel

bash
1
dpkg --get-selections | grep hold

Ref : Ubuntu 禁止内核更新