> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# 3 Ways to Check Linux Kernel Version in Command Line
- URL: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/
- Published: 2012-09-30T23:00:45.000Z
- Updated: 2023-09-12T12:29:16.000Z
- Description: Wondering which Linux kernel version your system uses? Here are several ways to check your kernel version in the Linux terminal.
- Author: Abhishek Prakash
- Tags: Tutorial

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

**How do I find the Linux kernel version?**

You can use the following command to get the Linux kernel version:

```
uname -r
```

You'll see an output like this:

![check linux kernel version](https://itsfoss.com/content/images/2023/09/check-linux-kernel-version-number-1.png)

Which shows that the kernel version in use is 6.2\. I'll share what does `generic` means in the output along with tips on getting even more detailed information about kernels.

📋

I am using Ubuntu while writing this article. But these commands are generic and can be used on Fedora, Debian, CentOS, SUSE Linux, or any other Linux distribution.

[Subscribe to It's FOSS YouTube Channel](https://www.youtube.com/@itsfoss?ref=itsfoss.com)

## 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](https://itsfoss.com/32-bit-64-bit-ubuntu/).

Open a terminal and type in the following command:

```
uname -r
```

![Checking Linux kernel version in command line](https://itsfoss.com/content/images/wordpress/2012/09/find-linux-kernel-version-1.jpg)

The output will be something similar to this:

```
4.4.0-97-generic
```

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’.

### Get even more details on the Linux kernel

You can also [use the uname command](https://linuxhandbook.com/uname/?ref=itsfoss.com) with the option **\-a**. This will provide more system information if you need it.

```
uname -a
```

![Checking Linux kernel version in command line](https://itsfoss.com/content/images/wordpress/2012/09/find-linux-kernel-version-2.jpg)

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.

💡

Use the command cat /etc/os-release to [know which Linux distribution you are using](https://linuxhandbook.com/check-linux-version/?ref=itsfoss.com).

## 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:

```
cat /proc/version
```

![Checking Linux kernel version in command line](https://itsfoss.com/content/images/wordpress/2012/09/find-linux-kernel-version-3.jpg)

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

```
Linux version 4.4.0-97-generic (buildd@lcy01-33) (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.

💡

Use lsb\_release -a command if you just want to [see the version number and codename in Ubuntu](https://itsfoss.com/how-to-know-ubuntu-unity-version/).

## 3\. Find Linux kernel version using dmesg command

[dmesg](http://www.linfo.org/dmesg.html?ref=itsfoss.com) 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.

```
dmesg | grep Linux
```

![Checking Linux kernel version in command line](https://itsfoss.com/content/images/wordpress/2012/09/find-linux-kernel-version-4.jpg)

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 (buildd@lcy01-33) (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
```

## Get more Linux system information

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

If you are interested, here are a few more articles to learn more about your Linux system.

[How to Check Ubuntu Version and Other System InformationWondering which Ubuntu version you’re using? Here’s how to check your Ubuntu version, desktop environment and other relevant system information.![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSAbhishek Prakash![](https://itsfoss.com/content/images/wordpress/2013/03/check-ubuntu-version-featured.jpg)](https://itsfoss.com/how-to-know-ubuntu-unity-version/)

[Use inxi to Get All Kind of System Information in Linuxinxi is a handy script that provides you with the system hardware and software information about the Linux system it is executed on. Learn more about using it.![](https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png)It's FOSSPratham Patel![](https://itsfoss.com/content/images/wordpress/2021/12/inxi-system-info-linux.png)](https://itsfoss.com/inxi-system-info-linux/)

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