I  have Ubuntu systems and I have an old kernel. I want to upgrade my Linux system kernel. How can I do that? Linux kernel can be upgraded by two ways one way is getting source code compiling and installing it. The second way is by using the package manager to update the kernel. We will look at how to update kernel for different distributions. Keep in mind that upgrade operation needs root privileges.

我有Ubuntu系统,并且有一个旧的内核。 我想升级我Linux系统内核。 我怎样才能做到这一点? Linux内核可以通过两种方式升级,一种方式是获取源代码进行编译和安装。 第二种方法是使用程序包管理器更新内核。 我们将研究如何针对不同的发行版更新内核。 请记住,升级操作需要root特权。

什么是Linux内核? (What Is Linux Kernel?)

Linux is actually not a complete operating system. It is just a kernel. Kernel means the low-level part of the operating system which mainly provides system resources to the applications and high-level services. Linux kernel management resources like RAM, CPU, Disk, Input/Output Graphics, etc. Linux kernel also manages processes and user rights.

Linux实际上不是完整的操作系统。 它只是一个内核。 内核是指操作系统的低级部分,主要为应用程序和高级服务提供系统资源。 Linux内核管理资源,例如RAM,CPU,磁盘,输入/输出图形等。Linux内核还管理进程和用户权限。

列出当前Linux内核 (List Current Linux Kernel)

Ubuntu,Debian,Mint,Kali(Ubuntu, Debian, Mint, Kali)

We will use dpkg command in order to list the currently installed Linux kernel version.

我们将使用dpkg命令来列出当前安装Linux内核版本。

$ dpkg -l | grep "linux-image"
List Current Linux Kernel
List Current Linux Kernel
列出当前Linux内核

Fedora,CentOS,RedHat(Fedora, CentOS, RedHat)

We will use rpm command in order to list currently install Linux kernel version for Fedora, CentOS, RedHat.

我们将使用rpm命令来列出当前为Fedora,CentOS,RedHat安装Linux内核版本。

$ yum list  installed | grep kernel
List Current Linux Kernel
List Current Linux Kernel
列出当前Linux内核

获取新Linux内核(Get New Linux Kernel)

During the update of the Linux kernel, we need root privileges so we will use sudo command with the package management commands yum and apt

在更新Linux内核期间,我们需要root特权,因此我们将sudo命令与软件包管理命令yumapt

Ubuntu,Debian,Mint,Kali (Ubuntu, Debian, Mint, Kali)

As Linux kernel is named as linux-image in deb based distributions we will upgrade all linux-image packages with the following apt command.

由于Linux内核在基于deb的发行版中被称为linux-image ,因此我们将使用以下apt命令升级所有linux-image软件包。

$ sudo apt-get update linux-image* && sudo apt-get dist-upgrade linux-image*

Fedora,CentOS,Red Hat (Fedora, CentOS, Red Hat)

And distributions like Fedora, CentOS, RedHat names Linux kernel package as kernel and we will update the kernel package with the following yum command.

诸如Fedora,CentOS,RedHat之类的发行版将Linux内核程序包命名为kernel ,我们将使用以下yum命令更新内核程序包。

$ sudo yum update kernel-*

如何更新和升级Linux内核? 信息移植 (How To Update and Upgrade Linux Kernel? Infografic)

How To Update and Upgrade Linux Kernel? Infografic
How To Update and Upgrade Linux Kernel? Infografic
如何更新和升级Linux内核? 信息移植
LEARN MORE  What Is APT (Advanced Package Tool) For Linux?
了解更多信息什么是Linux的APT(高级软件包工具)?

翻译自: https://www.poftut.com/how-to-update-and-upgrade-linux-kernel/

Logo

更多推荐