Find Linux / UNIX Kernel Version Command

How do I find out what kernel version I am currently running under Debian Linux or any other Linux distribution using a shell prompt? How do I find out Unix kernel version? How can I find out my Linux / UNIX kernel version using the ssh command?

You need to use the uname command to print certain system information such as:

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements None
Est. reading time 1m
  1. Linux Kernel version and name.
  2. Print the Unix machine hardware name.
  3. Find out about server processor type.
  4. Display the operating system and more.

uname command to display the Linux or Unix kernel version

This command works under all Linux distributions and other UNIX-like operating systems such as FreeBSD, OpenBSD, Solaris, HP UX, OS X and friends. Type the following command to see running kernel version:
$ uname -r
Output taken from Linux based system:



  • 2 : Kernel version
  • 6 : The major revision of the kernel
  • 22 : The minor revision of the kernel
  • 14 : Immediate fixing / bug fixing for critical error
  • generic : Distribution specific sting. For example, Redhat appends string such as EL5 to indicate RHEL 5 kernel.

Another common usage is as follows:
$ uname -mrsn
Output taken from Linux:

Linux 2.6.18-53.1.4.el5 x86_64

Here is another output from RHEL 8:

How To Find Linux / UNIX Kernel Version Command

My RHEL 8 kernel version

Outputs from my OS X Unix desktop

$ uname -a  
Darwin desktop01 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64

Outputs from OpenBSD Unix server

$ uname -mrs
OpenBSD 5.4 amd64

For example, at the prompt, I type the following on AIX unix to print OS name:
Sample outputs:


Common uname options

Option Description
-a Behave as though the options -m, -n, -r, -s, and -v were specified.
-i Write the kernel ident to standard output.
-K Write the FreeBSD version of the kernel.
-m Displays the machine ID number of the hardware running the system.
-n Write the name of the system/node to standard output.
-o This is a synonym for the -s option, for compatibility with other systems.
-p Displays the architecture of the system processor.
-r Displays the release number of the operating system.
-s Write the name of the operating system implementation to standard output.
-v Write the version level of this release of the operating system to standard output.

How to find the kernel version with /proc/version file (Linux only command)

You can also obtain kernel version from /proc/version file by using cat command as follows:
$ less /proc/version
$ more /proc/version
$ cat /proc/version

Sample outputs:

Linux version 2.6.18-53.1.4.el5 ( (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP Wed Nov 14 10:37:27 EST 2007

Related media

See how to use uname and other commands to find the kernel version on Linux or Unix-like oses:

Video 01: Find The Linux/Unix Kernel Version Command Tutorial

Package management tools (Linux only command)

You can list all installed kernel and its version with the following command under RHEL / CentOS / Suse / Fedora Linux :
$ rpm -q kernel


If you are using Debian / Ubuntu, try:
$ dpkg --list | grep linux-image

ii  linux-image                                           Generic Linux kernel image.
rc  linux-image-2.6.20-15-generic          2.6.20-15.27                         Linux kernel image for version 2.6.20 on x86/
ii  linux-image-2.6.20-16-generic          2.6.20-16.32                         Linux kernel image for version 2.6.20 on x86/
ii  linux-image-2.6.22-14-generic          2.6.22-14.47                         Linux kernel image for version 2.6.22 on x86/
ii  linux-image-generic                                   Generic Linux kernel image


We have shown you how to find the version of the Unix and Linux kernel running on your server/desktop/laptop/workstion from the command line. See uname man page here and here for more info.

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

🐧 29 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat 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
29 comments… add one
  • Bhargav Jan 8, 2008 @ 9:05

    In Solaris uname -r will give you the solaris release level.
    some other usefull options with uname are

    uname -s [Operating system]

    uname -r [Release version]

    uname -v
    Generic_117350-27[OS version]

    uname -a
    SunOS hostname 5.8 Generic_117350-27 sun4u sparc

    the last two words describes h/w name and processor respctl[equivalent to -m and -p),

  • Mohit Jan 29, 2008 @ 10:21

    I log on to different RedHat based servers, Can you please update on how to differentiate between Centos, RedHat, Oracle Linux (i.e. RedHat based distributions) sitting remotely.

    # uname -a (doesn’t help)
    # cat /etc/redhat-relaese (its changed to RedHat as some softwares don’t get installed otherwise.


  • Krishna Feb 20, 2008 @ 7:42

    Quite useful for beginners and mediocre persons.

  • snehaliteng Sep 27, 2008 @ 8:52

    i need linux fonts

  • Sourav Mohanty May 27, 2009 @ 6:20


  • Robbie Sep 3, 2009 @ 16:23

    cat /etc/redhat-release
    this will give you redh hat version or centos version

    • Arif May 14, 2010 @ 9:11

      $ cat /etc/redhat-release

      this command return the Centos version


      • 突擊 May 6, 2015 @ 21:03


  • Phil Oct 5, 2010 @ 14:56

    Newbie here….kind of got thrown in Linux admin for Centos at work due to staff reduction. Confused about something (well lots of things, but can’t seem to find the answer to this particular question).

    [root@xxx ~]# rpm -qa kernel

    [root@xxx ~]# uname -a
    Linux xxx 2.6.9-78.0.22.EL #1 Thu Apr 30 19:03:25 EDT 2009 i686 athlon i386 GNU/Linux

    Why does rpm -qa show kernel-2.6.9-89.0.xxxxx installed but uname -a shows 2.6.9-78.00.22.EL?

    I know this probably really stupid question – sorry :(


  • Nitin Feb 8, 2011 @ 14:51

    Send me all shell and kernel cammond of linux or unix

    • AMukh Feb 23, 2011 @ 6:31

      Life is so easy huh? :)

      Send me all the words in the english language and their uses ( I dont claim that this line is original ;) )

      • ABCD May 2, 2012 @ 6:52

        hahaha…lol…AMukh…ur reply is perfect….life is not that easy

  • Lawrence Apr 5, 2011 @ 5:49


  • hameed Oct 27, 2011 @ 6:16

    Thank you very much all friend

  • Anatoly Jan 27, 2012 @ 0:13

    Utility uname don’t have any info about OS version, only OS platform!!! uname -p gives
    GNU/Linux… No info there are in environment variables. But I need the info like that
    openSUSE 12.1 (x86_64)… How to solve this problem? I don’t want to set some environment variable manually…

  • devon Feb 22, 2012 @ 13:38

    can you install linux on a computer that has another operating system already installed

    • Arkt Mar 10, 2012 @ 22:14

      Yes, this is possible.

    • anky Apr 10, 2012 @ 11:58

      use any VM to install multiple os on same machine

  • Naveed Mar 11, 2012 @ 7:45

    I have installed “Linux mint” I want to know the complete info of my Linux version installed like Linux version kernel version

  • SHAHID Mar 16, 2012 @ 11:34


  • sriram Mar 26, 2012 @ 9:25

    Thank U Very Much senior and all

    • jagadish Sep 10, 2013 @ 13:07

      xcuse me bro..
      i wanna install fedora on VMWARE for running shell and c programming but my vmware is not listing out fedora OS .. what i should do …
      It listing out “Linux Kernel 2.6.10” Is it similar to fedora ? Can i run shell scripts and c programz ???

  • anky Apr 10, 2012 @ 11:57

    how to get the OS manufacturer,OS version,OS serial number and number of registered users on linux machine

    • sid Apr 13, 2012 @ 8:58

      sudo cat /etc/passwd | grep /bin/bash
      UID’s 1000 and above are valid users plus UID 0 for root

  • sid Apr 12, 2012 @ 21:30

    dpkg –list | grep linux-image
    ii linux-image-2.6.38-11-generic 2.6.38-11.50 Linux kernel image for version 2.6.38 on x86/x86_64
    rc linux-image-2.6.38-8-generic 2.6.38-8.42 Linux kernel image for version 2.6.38 on x86/x86_64
    ii linux-image-3.0.0-12-generic 3.0.0-12.20 Linux kernel image for version 3.0.0 on x86/x86_64
    ii linux-image-3.0.0-16-generic 3.0.0-16.29 Linux kernel image for version 3.0.0 on x86/x86_64
    ii linux-image-3.0.0-17-generic 3.0.0-17.30 Linux kernel image for version 3.0.0 on x86/x86_64
    ii linux-image-generic Generic Linux kernel image

    what does it mean 32 or 64 bit ?

    when give uname -a o/p is
    Linux xxxxx 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 2 17:34:21 UTC 2012 i686 i686 i386 GNU/Linux

    when i do file on some executable it tells it 32 bit.
    ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped

  • fengchao Jul 26, 2012 @ 2:03

    thanks a lot.

  • Tamil Aug 10, 2012 @ 14:17


    I need Kernel type and can u explain?

  • Rizvi Apr 30, 2013 @ 4:35

    Thanks for publishing useful contents like this……..

  • Vipul Sep 4, 2016 @ 18:16

    I think Linux Kernel as break GSM code .
    I hope u understand what I’m saying….
    That is right…

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