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

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

$ cat /proc/version
Linux version ([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
$ cat /etc/issue
Debian GNU/Linux 5.0 \n \l

Check Ubuntu version number

$ cat /etc/lsb-release
$ 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 or credit card

Please note that this article is published by 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 as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean