How to check Linux version

Last updated on November 22, 2020 by Dan Nanni

Check Linux kernel version

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
2.6.32-220.el6.x86_64

Another way to check Linux kernel version is via /proc/version.

$ cat /proc/version
Linux version 2.6.43.5-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

Check Linux Distro Version

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.

Check Debian version number

$ cat /etc/debian_version
5.0.7
$ cat /etc/issue
Debian GNU/Linux 5.0 \n \l

Check Ubuntu version number

$ 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

Check CentOS version number

$ cat /etc/*-release
CentOS release 6.2 (Final)

Check RedHat version number

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.0 (Santiago)

Check Fedora version number

$ cat /etc/fedora-release
Fedora release 14 (Laughlin)

Check OpenSuSE version number

$ cat /etc/SuSE-release
openSUSE 12.1 (x86_64)
VERSION = 12.1
CODENAME = Asparagus

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal (Credit Card) or Bitcoin (1M161JGAkz3oaHNvTiPFjNYkeABox8rb4g).

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.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean