How To Update and Upgrade Linux Kernel?


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.

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.

List Current Linux Kernel

Ubuntu, Debian, Mint, Kali

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

$ dpkg -l | grep "linux-image"
List Current Linux Kernel
List Current Linux Kernel

Fedora, CentOS, RedHat

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

$ yum list  installed | grep kernel
List Current Linux Kernel
List Current Linux Kernel

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

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.

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

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.

$ sudo yum update kernel-*

 

How To Update and Upgrade Linux Kernel? Infografic

How To Update and Upgrade Linux Kernel? Infografic
How To Update and Upgrade Linux Kernel? Infografic

 

LEARN MORE  What Is an Operating System (OS)?

3 thoughts on “How To Update and Upgrade Linux Kernel?”

Leave a Comment