Last updated on November 22, 2020 by Dan Nanni
It is important to know which version of Linux kernel you are running because many software or libraries require that certain kernel subsystems and features be available in order for them to run properly. Knowing the kernel version can also be helpful in diagnosing systems or debugging software problems.
You can check Linux kernel version by using
uname command. In the example below, it shows that you are running a Linux kernel 2.6.32.
$ uname -r
Another way to check Linux kernel version is via
$ cat /proc/version
Linux version 126.96.36.199-2.fc15.x86_64 ([email protected]) (gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC) ) #1 SMP Tue May 8 11:09:22 UTC 2012
If you would like to know the version number of your Linux distribution (e.g., Debian, Ubuntu, CentOS, etc.), you can follow the distribution-specific instructions below.
$ cat /etc/debian_version
$ cat /etc/issue
Debian GNU/Linux 5.0 \n \l
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS"
$ cat /etc/issue
Ubuntu 10.04.4 LTS \n \l
$ cat /etc/*-release
CentOS release 6.2 (Final)
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.0 (Santiago)
$ cat /etc/fedora-release
Fedora release 14 (Laughlin)
$ cat /etc/SuSE-release
openSUSE 12.1 (x86_64) VERSION = 12.1 CODENAME = Asparagus
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.