Kernel version linux ubuntu

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 link time reference

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

TUTORIALS ON LINUX, PROGRAMMING & TECHNOLOGY

Источник

3 Ways to Check Linux Kernel Version in Command Line

You may find yourself in a situation where you need to know the exact Linux kernel version used on your system. Thanks to the powerful Linux command line, you can easily find that out.

A quick way to check Linux kernel version: You can use the following command to get the Linux kernel version:

There are other ways to get even more detailed information about kernels. Read the rest of the article to learn it in detail.

In this article, I’ll show you various methods for finding out your kernel version and tell you what those numbers mean. If you prefer videos, here’s a quick one:

Check Kernel Version In Linux

1. Find Linux kernel using uname command

uname is the Linux command for getting system information. You can also use it to find out whether you’re using a 32-bit or 64-bit system.

Open a terminal and type in the following command:

Checking Linux kernel version in command line

The output will be something similar to this:

This means that you’re running Linux kernel 4.4.0-97, or in more generic terms, you are running Linux kernel version 4.4.

But what do the other digits mean here? Let me explain:

  • 4 – Kernel version
  • 4 – Major revision
  • 0 – Minor revision
  • 97 – Bug fix
  • generic – Distribution-specific string. For Ubuntu, it means I’m using the desktop version. For Ubuntu server edition, it would be ‘server’.

You can also use the uname command with the option -a. This will provide more system information if you need it.

Checking Linux kernel version in command line

The output of the command should look like this:

Linux itsfoss 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Let me explain the output and what it means:

  • Linux – Kernel name. If you run the same command on BSD or macOS, the result will be different.
  • itsfoss – Hostname.
  • 4.4.0-97-generic – Kernel release (as we saw above).
  • #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 – This means that Ubuntu has compiled 4.4.0-97-generic 120 times. A timestamp for the last compilation is also there.
  • x86_64 – Machine architecture.
  • x86_64 – Processor architecture.
  • x86_64 – Operating system architecture (you can run a 32-bit OS on a 64-bit processor).
  • GNU/Linux – Operating system (and no, it won’t show the distribution name).

But I’ll save you from information overload. Let’s see some other commands to find your Linux kernel version.

2. Find Linux kernel using /proc/version file

In Linux, you can also find the kernel information in the file /proc/version. Just look at the contents of this file:

Checking Linux kernel version in command line

You’ll see an output similar to what you saw with uname.

Linux version 4.4.0-97-generic ([email protected]) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017

You can see the kernel version 4.4.0-97-generic here.

Читайте также:  Linux отменить последнее обновление

3. Find Linux kernel version using dmesg command

dmesg is a powerful command used for writing kernel messages. It’s also very useful for getting system information.

Since dmesg provides an awful lot of information, you should normally use a command like less to read it. But since we’re here just to check the Linux kernel version, grepping on ‘Linux’ should give the desired output.

Checking Linux kernel version in command line

The output will have a few lines but you should be able to identify the Linux kernel version there easily.

[ 0.000000] Linux version 4.4.0-97-generic ([email protected]) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 (Ubuntu 4.4.0-97.120-generic 4.4.87) [ 0.182880] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored [ 1.003861] Linux agpgart interface v0.103 [ 1.007875] usb usb1: Manufacturer: Linux 4.4.0-97-generic xhci-hcd [ 1.009983] usb usb2: Manufacturer: Linux 4.4.0-97-generic xhci-hcd [ 5.371748] media: Linux media interface: v0.10 [ 5.399948] Linux video capture interface: v2.00 [ 5.651287] VBoxPciLinuxInit

How do you check your Linux Kernel version and other information?

Of the three ways discussed here, I use uname all the time. It’s the most convenient.

What about you? Which command do you prefer for getting Linux kernel information?

Источник

How do I find out the kernel version I am running?

I need this info so I can finish updating my STA Broadcom wireless. However, I’m a noob at Ubuntu and I’m not sure how to find the kernel version or kernel. I checked /lib/modules/ and found this:

2.6.27-10-generic 2.6.32-30-generic 2.6.32-34-generic 2.6.32-38-generic 2.6.27-7-generic 2.6.32-31-generic 2.6.32-35-generic 3.2.0-54-generic 2.6.28-19-generic 2.6.32-32-generic 2.6.32-36-generic 3.2.0-54-generic-pae 2.6.31-23-generic 2.6.32-33-generic 2.6.32-37-generic 

Which one is the running kernel? Another question. Is there a snippet so I don’t have to cut and paste? Thanks for your time! 🙂

6 Answers 6

Well there are multiple ways to find the kernel version

Open terminal and execute:

It would display something like:

You can get further information on the current kernel with

It would display something like:

Linux saurav-P4I45Gx-PE 3.8.0-30-generic #44~precise1-Ubuntu SMP Fri Aug 23 17:33:45 UTC 2013 i686 i686 i386 GNU/Linux 

Another way to know the kernel version is to open Synaptic Package Manager and search for linux image . You have to check for the installed Kernel version.

Another way to find version of installed kernels is to run this command:

dpkg -l | grep linux-image | grep ii 

or for just the version strings:

dpkg -l | grep linux-image | grep ii | awk '' 

The latest kernel (the one with the highest version number) will boot by default, so if you have rebooted since the last kernel update, and you have not made adjustments to boot into a kernel other than the default, then you can be reasonably confident that the highest version number displayed will be the version of the running kernel, but you should use uname for more reliable information.

Источник

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