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/

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