Linux kernel package version

Check and Update Ubuntu Kernel Version on Ubuntu 22.04

The Linux kernel is an essential component of the Linux Operating System. It helps to connect with computer software and the hardware in the Linux operating system. It is used to manage the system’s memory and act as a bridge between the process and hardware. The latest stable version of the Ubuntu kernel is 5.18.8 while the latest developer version is 5.19.0.

It is a good practice to update the kernel version randomly to get the latest version. As it provides updated and stable functions and improved security features etc. This descriptive write-up will enlist the methods to check as well as update the Kernel version on Ubuntu 22.04.

How to Check the Ubuntu Kernel Version on Ubuntu 22.04?

It is a good choice to check the Ubuntu kernel version on Ubuntu 22.04 before updating it. You can check the Ubuntu kernel version with the help of the following methods:

Method 1: Using the uname Command

The “uname” command displays the system information. It can be used with the “-r” flag to get your current Kernel version:

The installed kernel version is 5.15.0-39-generic.

Method 2: From /proc/version File

The “/proc/version” file contains the current Linux kernel version, the version of GCC used to compile the kernel and the compile time of the Kernel. The “cat” command can be used to get the content of this file as we did here:

It can be seen that the installed kernel version is 5.15.0-39-generic.

Note: By default, our Ubuntu 22.04 has the Kernel version 5.15.0.39.

How to Update the Ubuntu Kernel Version on Ubuntu 22.04?

After checking the installed kernel version on Ubuntu 22.04, you can update it with the help of the below-mentioned methods. Go along with the steps to update the Kernel version from the official site using Ubuntu’s terminal.

Step 1: Download the latest Linux kernel

The Kernel.Ubuntu.com contains all the Kernel versions (stable and under testing). You can use the following link to update to any of your desired Kernel versions:

https://kernel.ubuntu.com/~kernel-ppa/mainline/

In our case, we are going to download the v5.19-rc4 from the following link:

https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.19-rc4/

In the following interface, download the .deb files of latest kernel version manually:

Читайте также:  Linux on dex apk

Note: At the time of this write-up, the 5.19-rc4 is the latest release candidate of version 5.19(which is under testing).

Or you can download these files using the “wget” command.

The Linux headers are the packages that provide the kernel headers. It is used to run the drivers and modules to support the kernel. To download Linux-headers, run the below-mentioned command:

$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.19-rc4/amd64/linux-headers-5.19.0-051900rc4_5.19.0-051900rc4.202206262230_all.deb

The Linux-image package is used to hand over the control to the Linux kernel. To download Linux-image, run the following command:

$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.19-rc4/amd64/linux-image-unsigned-5.19.0-051900rc4-generic_5.19.0-051900rc4.202206262230_amd64.deb

The Linux module is a code used to extend the executing kernel. To download Linux-modules, run the following command:

$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.19-rc4/amd64/linux-modules-5.19.0-051900rc4-generic_5.19.0-051900rc4.202206262230_amd64.deb

The latest kernel version files have been downloaded.

Step 2: Install the .deb files of the Ubuntu kernel

Navigate to the Downloads directory where the files are downloaded and use the ls command to verify the availability of the files:

The files have been downloaded in the Downloads directory.

It is observed that there are only three Debian packages in our Downloads directory. Therefore, we have used the wild-card (“*”) in the following dpkg command to install all these Debian packages.

The Ubuntu kernel version has been installed successfully.

Step 3: Reboot the system

Although the Kernel packages have been installed, the system will not update the Kernel version until you restart it. Therefore, reboot your system using the provided command below:

Enter the Password to reboot the system.

Step 4: Verify the version

To check the installed Kernel version on Ubuntu 22.04, execute the provided command below:

It is verified that the installed version of the Ubuntu kernel is 5.19.0 (release candidate 4 (rc4)).

Bonus Tip: How to Fall Back to the Default Linux Kernel Version on Ubuntu 22.04?

You can fall back to the default Ubuntu kernel version on Ubuntu 22.04 using the Grub Menu. To do so, obey the below-mentioned procedure:

Step 1: Open the Grub Menu

To open the Grub Menu, reboot the system and hold the “Shift” key.

Step 2: Select the Advanced options for Ubuntu

In the Grub Menu, choose the “Advance option for Ubuntu” using the arrow keys:

Step 3: Select the Linux Generic version

Select the Linux generic kernel version using the arrow key:

And press the “Enter” key.

You will fall back to the default Ubuntu kernel version on Ubuntu 22.04 successfully.

Here you go! You have successfully learned the different methods to check and update the Ubuntu kernel version on Ubuntu 22.04.

Conclusion

The Ubuntu kernel version can be checked using the “uname -r” and “cat /proc/version” commands. To update Kernel on Ubuntu 22.04, the Debian package files of the Kernel are downloaded from the official website and then install them using the “dpkg” command. In this guide, we have demonstrated various methods to check and update the Linux kernel on Ubuntu 22.04.

Читайте также:  Linux folder share command

TUTORIALS ON LINUX, PROGRAMMING & TECHNOLOGY

Источник

Linux kernel package version

NAME

kernel-package - system for creating kernel related packages

DESCRIPTION

The kernel-package package grew out of desire to automate the routine steps required to compile and install a custom kernel. If you are looking for instructions on how to use kernel-package, please have a look at the manual make-kpkg(1). Configuring instructions are to be found in kernel-pkg.conf(5).

Advantages of using kernel-package

i) Convenience. I used to compile kernels manually, and it involved a series of steps to be taken in order; kernel-package was written to take all the required steps (it has grown beyond that now, but essentially, that is what it does). This is especially important to novices: make-kpkg takes all the steps required to compile a kernel, and installation of kernels is a snap. ii) Multiple images support It allows you to keep multiple version of kernel images on your machine with no fuss. iii) Multiple Flavors of the same kernel version It has a facility for you to keep multiple flavors of the same kernel version on your machine (you could have a stable 2.0.36 version, and a 2.0.36 version patched with the latest drivers, and not worry about contaminating the modules in /lib/modules). iv) Built in defaults It knows that some architectures do not have vmlinuz (using vmlinux instead), and other use zImage rather than bzImage, and calls the appropriate target, and takes care of moving the correct file into place. v) Module hooks Several other kernel module packages are hooked into kernel-package, so one can seamlessly compile, say, pcmcia modules at the same time as one compiles a kernel, and be assured that the modules so compiled are compatible. vi) dpkg support It enables you to use the package management system to keep track of the kernels created. Using make-kpkg creates a .deb file, and dpkg can track it for you. This facilitates the task of other packages that depend on the kernel packages. vii) Configuration tracking It keeps track of the configuration file for each kernel image in /boot, which is part of the image package, and hence is the kernel image and the configuration file are always together. viii) Multiple config files It allows you to specify a directory with config files, with separate config files for each sub-architecture (even allows for different config files for i386, i486, etc). It is really neat for people who need to compile kernels for a variety of sub architectures. ix) Auxiliary kernel .deb packages It allows one to create a package with the headers, or the sources, also as a deb file, and enables the package management system to keep track of those (and there are packages that depend on the package management system being aware of these packages). x) Maintainer script services Since the kernel image package is a full fledged Debian package, it comes with maintainer scripts, which allow the user to add hook scripts to run when the package status changes. xi) Sub architecture support There is support for the multitudinous sub architectures that have blossomed under the umbrella of the m68k and power-PC architectures. xii) Portable kernel images Allows one to compile a kernel for another computer, for example using a fast machine to compile the kernel for installation on a slower machine. This is really nice since the modules are all included in the .deb; and one does not have to deal with modules manually. xiii) runtime hooks The preinst, postinst, prerm and the postrm scripts allow the local admin on the installation machine to add a script into runtime hooks; this can allow, amongst other things, grub users to add and remove kernel image stanzas from the grub menu (example scripts to do this are in the package). There are directories under /etc/kernel where related packages may drop off scripts that will be run by the maintainer scripts of the packages created by kernel package. Before running these scripts, the environment variable KERNEL_PACKAGE_VERSION shall be set to the version of the kernel-package that created the package. xiv) Append descriptive bits to the kernel version One can append to the kernel version on the command line, or by setting an environment variable. So if your kernel is called kernel-image-2.4.1John.Home; it is unlikely to be overridden by the official 2.4.1 kernel, since they are not the same version.

Disadvantages of using make-kpkg

i) Automation. This is a cookie cutter approach to compiling kernels, and there are people who like being close to the bare metal. ii) Non traditional This is not how it is done in the non-Debian world. This flouts tradition. (It has been pointed out, though, that this is fast becoming Debian tradition). iii) Needs superuser It forces you to use fakeroot or sudo or super or be root to create a kernel image .deb file (this is not as bad as it used to be before fakeroot).

FILES

SEE ALSO

make(1), make-kpkg(1), The GNU Make manual 

BUGS

There are no bugs. Any resemblance thereof is delirium. Really.

AUTHOR

This manual page was written by Manoj Srivastava srivasta@debian.org>, for the Debian GNU/Linux system.

Источник

Оцените статью
Adblock
detector