Want to find out which kernel versions are installed on Ubuntu? This post might come in handy for students and new users if they want to find out the running kernel version on Linux Ubuntu.
The kernel is the core of any operating system. Whether Windows, Mac OS, or Linux, it’s the most important and core operating system component.
The kernel sits between the hardware and the software. It manages hardware resources and relays information to the hardware on behalf of the software running on the computer.
For example, if a software application wants to use the CD ROM drive or play music to the sound card on the computer, the kernel will find the resource needed for the application to make that happen.
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
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 not available 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 to find which Linux kernel is installed and running on Ubuntu.