How to check Linux Kernel Version on Ubuntu Linux

|

|

The post explains how users, especially newbies and students, can determine the Linux kernel version installed on Ubuntu. Kernel, being the OS core, mediates between hardware and software. Users can find the kernel version using ‘uname’, ‘hostnamectl’ commands or through the /proc/version file. Successfully doing so indicates the generic Linux distribution, architecture, and the kernel…

This brief tutorial shows students and new users how to find out which kernel version is installed and running on Ubuntu 18.04 | 16.04 LTS

Learning to check the Linux kernel version on Ubuntu Linux can be useful for various reasons. For instance, it can help you troubleshoot issues on your system, identify compatibility issues with certain software, and determine if your system is running on the latest kernel version.

Additionally, knowing the kernel version can help you understand your system’s capabilities and what features it supports. Overall, it’s a useful skill for any Linux user to have.

To get started, see the options below:

Use uname Command

The most frequently used Command to find out which version of Linux kernel is currently installed and running is the uname Command. Simply run the uname Command followed by a few options to get Linux kernel details.

To do that, run the commands below:

uname -srm

That should output a similar line as shown below:

Output:
Linux 4.18.0-25-generic x86_64

That tells you that the kernel begins to a generic Linux distribution, a 64-bit with version # 4.18.0-25

Use the hostnamectl Command

Another method to find out which kernel is installed and running with a bit of other information is the hostnamectl Command. This Command provides other details of the systems unavailable when using the first option above.

To use the hostnamectl Command, simply type it:

hostnamectl

It should show an output below

Output:
   Static hostname: ubuntu1804
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 988794b9775a47a8b06ca2c946f449c2
           Boot ID: 2d080daabaf84f98ae733a7617ac0464
    Virtualization: oracle
  Operating System: Ubuntu 18.04.2 LTS
            Kernel: Linux 4.18.0-25-generic
      Architecture: x86-64

Again, the same kernel; now you see its Architecture belongs to the 64-bit family.

Use the /proc/version File

Both command option options above use the content of the /proc/version file to generate and display the kernel version. While using the commands is a quicker option, you can sample the content of the version file by running the commands below:

cat /proc/version

That displays the output as below:

Output:
Linux version 4.18.0-25-generic (buildd@lgw01-amd64-033) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #26~18.04.1-Ubuntu SMP Thu Jun 27 07:28:31 UTC 2019

The Kernel number 4.18.0-24 is identified as:

  • 4 – Kernel Version Number
  • 18 – Major Revision Number
  • 0 – Minor Revision Number
  • 25 – Patch Number
  • generic – Represents Generic Linux Distribution

These are some options available to you to find Linux kernel versions. These methods should come in handy if you’re new or a student.

That’s it!

Congratulations: You have successfully learned which Linux kernel is installed and running on Ubuntu.


Discover more from Geek Rewind

Subscribe to get the latest posts to your email.

Like this:



One response to “How to check Linux Kernel Version on Ubuntu Linux”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

Discover more from Geek Rewind

Subscribe now to keep reading and get access to the full archive.

Continue reading