Ubuntu22.04 內核切換(降級&升級)

查看現在的內核版本

uname -r

查看現在安裝的內核有哪些

dpkg --get-selections | grep linux
dpkg --list |grep linux

查看可用的內核版本

sudo apt-cache search linux-image

下載內核版本並安裝

sudo apt-get install linux-headers-5.4.0-99-generic
sudo apt-get install linux-image-5.4.0-99-generic
sudo apt-get install linux-modules-5.4.0-99-generic
sudo apt-get install linux-modules-extra-5.4.0-99-generic

更新啟動內核(GRUB)

更改Grub文件

sudo vi /etc/default/gru

更改Grub文件啟動內核並存檔

GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu,with Linux 5.4.0-99-generic"

更新Grub

sudo update-grub

重新啟動

sudo reboot