How To Upgrade Linux Kernel

How To Upgrade Linux Kernel : Linux Kernel 5.14 LTS Released

Linux Kernel 5.10 LTS has arrived and it’s been a few days since it has been available for the public. It is the latest mainline release of the Linux Kernel. You can read the announcement by the boss Linus Torvalds in an email to the Linux Kernel Mailing List (LKML).

Linux Kernel 5.10 LTS Released: How To Upgrade Linux Kernel

Well, Don’t try to update or upgrade the Linux kernel if you are not sure what you are going to do. Sometimes it might crash your systems.

How To Upgrade Linux Kernel In Ubuntu 20.04 LTS

Note: Please make sure that you have a backup of your important file before upgrading the Linux kernel.

Method 1:

Use UkTools to upgrade Linux Kernel in Ubuntu 20.04 LTS. Run the following  command to download and install UkTools in Ubuntu:

git clone https://github.com/usbkey9/uktools && cd uktools
make

Run the following command to upgrade Kernel:

do-kernel-upgrade

Run the following command to remove old and unused kernels in Ubuntu :

do-kernel-purge

Method 2:

We will use Linux Kernel Utilities to upgrade the Linux kernel. Linux Kernel Utilities is a set of BASH shell scripts that can be used to update Linux kernels. There are 3 scripts in this shell scripts:

  • compile_linux_kernel.sh
  • update_ubuntu_kernel.sh
  • remove_old_kernels.sh

Compile_linux_kernel.sh:-  To compile and install the latest Linux Kernel from the source.

READ More Relevant Stuff:  Best Free NAS Software In 2023 [Linux & Windows]

update_ubuntu_kernel.sh:- To download and install/update the already compiled Ubuntu Kernel.

remove_old_kernel.sh:- To removes all inactive and unused Linux Kernels from the system.

Run the following commands to install Linux Kernel utilities in Ubuntu 20.04 LTS:

git clone https://github.com/mtompkins/linux-kernel-utilities.git
cd linux-kernel-utilities/
chmod 750 *.sh
git pull

Now, Run the following command to list the available Kernel. Follow the on-screen instruction and select the latest kernel.

./compile_linux_kernel.sh

Run the following command to compile and install the latest available Linux Kernel:

./compile_linux_kernel.sh --latest

Run the following command to install precompiled Kernel:

./update_ubuntu_kernel.sh

To compile a kernel from a local archive file

./compile_linux_kernel.sh --archive=linux-x.x.x.tar.xz

It will list out all available pre-compiled Linux Kernels from Kernel.ubuntu.com. You can see the number and you need to enter the desired number to install the selected Kernel.

Now restart your Ubuntu system.

Meanwhile, To download and install the latest a precompiled Ubuntu kernel from kernel.ubuntu.com, Run the following command:

./update_ubuntu_kernel.sh --latest

Now, Run the following command to remove old kernels.

./remove_old_kernels.sh

How To Upgrade Linux Kernel In CentOS 8

If you are using CentOS on the home or production server, then we won’t recommend upgrading the kernel unless to try it for testing.

You need to add the GPG key for the repository to make the installation secure in CentOS 8.

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

You need to add an external repository named ‘elrepo’ on CentOS 8.

dnf install https://www.elrepo.org/elrepo-release-8.0-2.el8.elrepo.noarch.rpm

Now, run the following command to install the new Linux Kernel in CentOS 8.

dnf --enablerepo=elrepo-kernel install kernel-ml

After completing the installation, you need to reboot your system to view the changes. Run the following command to see the version of Linux Kernel.

uname -msr

How To Upgrade Linux Kernel In RHEL 8

Updating kernel with yum in RedHat Linux 8.

READ More Relevant Stuff:  Linux Kernel 5.14 Officially Released

It is pretty simple to upgrade the Linux kernel in RHEL 8 with the yum command.

yum update kernel

To install a specific version of Linux Kernel in RHEL 8, run the following yum command. For a list of available kernels, refer to Red Hat Code Browser.

yum install kernel -{version}

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *