debian9.6更換內核(最簡單的命令方式)

用這種不是最新的,但是可以更換比較新的內核,比如我剛剛換了4.19的,事實上現在官網最新的是4.20的。

1,設置源(stretch-backports)

guoyanzhang@bogon:~$ sudo cat /etc/apt/sources.list
[sudo] guoyanzhang 的密碼:
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main non-free contrib
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main non-free contrib
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main non-free contrib

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main non-free contrib
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main non-free contrib
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main non-free contrib

2,更新源文件

guoyanzhang@bogon:~$ sudo apt-get update

3,搜索內核

guoyanzhang@bogon:~$ apt-cache search linux-image

這個時候會出現很多,我選的是

linux-image-4.19.0-0.bpo.1-amd64 - Linux 4.19 for 64-bit PCs (signed)

4,安裝

guoyanzhang@bogon:~$ sudo apt-get install linux-image-4.19.0-0.bpo.1-amd64

5,卸載原來的內核

guoyanzhang@bogon:~$ sudo apt-get remove linux-image-4.9.0-8-amd64 

打linux-image然後tab會自動出來幾個內核的,選原來的刪除就是了,這個時候會跳出一個窗口,選N就行。

6,重啓

guoyanzhang@bogon:~$ uname -r
4.19.0-0.bpo.1-amd64

參考:https://www.cmsky.com/debian-upgrade-kernel/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章