ubuntu升级系统内核

一、下载内核包升级

1、ubuntu的版本

root@ncnode02:~# cat /etc/issue
Ubuntu 16.04 LTS \n \l

2、内核版本

root@ncnode02:~# uname -sr
Linux 4.4.0-21-generic

3、升级内核

要升级 Ubuntu 16.04 的内核,打开 http://kernel.ubuntu.com/~kernel-ppa/mainline/ 并选择列表中需要的版本(选择稳定版本 4.10.1)。

centos内核地址 https://www.kernel.org/pub/linux/kernel/v3.0/

接下来,根据你的系统架构下载 .deb 文件:

对于 64 位系统:

# wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001_4.10.1-041001.201702260735_all.deb
# wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001-generic_4.10.1-041001.201702260735_amd64.deb
# wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-image-4.10.1-041001-generic_4.10.1-041001.201702260735_amd64.deb

这是 32 位系统:

# wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001_4.10.1-041001.201702260735_all.deb
# wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001-generic_4.10.1-041001.201702260735_i386.deb
# wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-image-4.10.1-041001-generic_4.10.1-041001.201702260735_i386.deb

下载完成这些所有内核文件后,如下安装:

# dpkg -ivh *.deb

安装完成后,重启并验证新的内核已经被使用了:

root@ncnode02:~# uname -sr
Linux 4.4.0-101-generic

二、直接apt升级

修改/etc/apt/sources.list使用官方源
内容:

deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ xenial universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse


apt-get update
# apt-get install linux-headers-4.4.0-101 linux-headers-4.4.0-101-generic linux-image-4.4.0-101-generic(指定内核版本升级)

重启服务器用uname -sr查看内核版本


查看系统中有哪些内核

dpkg --get-selections |grep linux

移除内核

apt purge linux-image-4.4.0-040400-generic
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值