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/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值