Linux Command: Show Linux Version

What command I need to type to display Linux kernel version and other information such as Linux distribution name? How do I check Linux kernel version number?

You need to use the following two commands: [a] uname – Print kernel and system information.
Tutorial details
Difficulty level Easy
Root privileges No
Requirements None
Est. reading time 1m
[b] lsb_release – Print distribution-specific information. [c] /proc/version file – Print running kernel information.

How to check linux kernel version number?

Open a shell prompt (or a terminal) and type the following command to see your current Linux kernel version:
$ uname -r
Sample outputs:


Or type the following command:
$ uname -mrs
Sample outputs:

Linux 2.6.32-23-generic-pae i686

To print all information, enter:
$ uname -a
Sample outputs:

Linux vivek-laptop 2.6.32-23-generic-pae #37-Ubuntu SMP Fri Jun 11 09:26:55 UTC 2010 i686 GNU/Linux


  • 2.6.32-23 – Linux kernel version number
  • pae – pae kernel type indicate that I’m accssing more than 4GB ram using 32 bit kernel.
  • SMP – Kernel that supports multi core and multiple cpus.

/proc/version file

Type the following command to see Linux version info:
$ cat /proc/version
Sample outputs:

Linux version 3.2.0-0.bpo.1-amd64 (Debian 3.2.4-1~bpo60+1) ( (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Sat Feb 11 08:41:32 UTC 2012

The above output identifies the kernel version that is currently running. It includes the contents of /proc/sys/kernel/ostype, /proc/sys/kernel/osrelease, and /proc/sys/kernel/version files. For example:
$ cat /proc/sys/kernel/{ostype,osrelease,version}
Sample outputs:

#1 SMP Sat Feb 11 08:41:32 UTC 2012

Find Distribution Version

Type the following command:
$ cat /etc/*release
$ lsb_release -a
Sample outputs:

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 10.04 LTS
Release:	10.04
Codename:	lucid

Here is another output from my Debian based server:

lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 6.0.6 (squeeze)
Release:	6.0.6
Codename:	squeeze

Related media

This tutorial is also available in a quick video format:

Video 01: Find The Linux Kernel Version Command Tutorial

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 19 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
19 comments… add one
  • vivek Jul 10, 2013 @ 12:12

    COluld you please help what explaination it gives regarding version of linux?.

    Linux 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

  • TheLonelyDBA Aug 14, 2013 @ 21:57

    also a simple command that will show the release of the Linux you have:

    $ cat /etc/issue

    output: Red Hat Enterprise Linux Server release x.x

    • ralfaux Jan 27, 2015 @ 2:32

      How can you be a lonelyDBA when you can provide the perfect answer?

      While we’re at it, what should I do with my life? I know, lazy… ;-)

  • R.Muthukumar Oct 22, 2013 @ 7:16

    how to find OS name with service pack in suse linux.. can you please give the command..


    • Phil Nov 25, 2013 @ 23:46

      Not sure what you’re asking here exactly. To get a list of the packages installed you can use the rpm command. rpm -qa to query all packages installed (see man pages on command structure).

    • Sagar Bhuayr Feb 13, 2014 @ 5:55

      For check OS name simply enter “uname” command & for check packages installed or not we can check with the help of “rpm -qa packagename”.

    • Sriharsha Kalluru Aug 12, 2014 @ 6:30

      You can get that one from following commands.

      To determine it is SuSE:
      cat /proc/version

      To check SuSE version:
      cat /etc/SuSE-release
      SUSE LINUX Enterprise Server 9 (i586)
      VERSION = 9

  • Mohamed Ali Ahmed(Bile) Jan 20, 2014 @ 11:43

    thank you guys for this useful information.

  • Thiago Apr 28, 2014 @ 23:01

    Thanks very much !!!!

  • suresh sawant Apr 30, 2014 @ 18:18

    how to find linux redhat version

    for e.p.– redhat 4.4 , redhat 5.4, redhat 5.9

    • Kaniti May 9, 2014 @ 9:55

      cat /etc/*release

  • Girish KG Nov 26, 2014 @ 10:43

    grep -Eo ‘^[^ ]+’ /etc/ | sed ‘2d’

  • belal k Dec 18, 2014 @ 23:43

    If we want to search the contents of all of the files in current directory and display the total number of lines in them that contain the string Linux. Which of the below commands will do that

    • belal k Dec 18, 2014 @ 23:44

      cat * | grep Linux | wc -l
      cat * | wc -l
      grep Linux | wc -l
      cat * | head | grep Linux

      • Kirankumar May 28, 2015 @ 15:53

        cat * | grep Linux | wc -l will work .
        grep Linux * | wc -l , will also.


  • mahesh Sep 11, 2015 @ 7:32

    how to see the version of linux like for ex: redhat 4.4 , redhat 5.4, redhat 5.9
    you know if we make some modifications in /etc/redhat-release v can’t find the correct version like i made some modification redhat enterprises 6.4 to 7.4 all commands are showing this 7.4 version only but not showing original version of that o.s is there any command to see the linux original version please resply for this anybody thank you.

  • mahesh Sep 11, 2015 @ 7:35

    by the way in this site u r giving correct information(commands) and easy procedure thanks for that keep going like this thank u admin

  • rahul singh Sep 30, 2015 @ 13:35

    i have face issue in my xubantu 12.04 64 bit desktop version.
    when i give print command via excel system going to hang or may be not responding.

  • Lucky Nov 14, 2016 @ 17:59

    I bought a new laptop.. How to use that code with in my laptop to start the operating system..

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum