HowTo: Check Linux Kernel Version

by on February 13, 2012 · 0 comments· LAST UPDATED December 29, 2013

in , ,

I am a new Linux system user and MS-Windows XP refugees. How do I check Linux kernel version using a shell prompt?

You can use the following files to find out the kernel version that is currently running:

  1. /proc/version - This file stores a string which identifies the kernel version. It includes the contents of /proc/sys/kernel/ostype, /proc/sys/kernel/osrelease and /proc/sys/kernel/version.

Tutorial details
DifficultyEasy (rss)
Root privilegesNo
RequirementsNone
Estimated completion time1m

You can also use the following command for the same purpose:

  1. uname command - Display name and information about current kernel.
  2. Package manager such as rpm/yum or apt-get provides output information about the kernel.

How to find the kernel version using uname command

Open the Terminal app and type the following command to show you Linux system kernel version:

 
uname -r
 

Sample outputs:

2.6.32-431.1.2.el6.x86_64

Where,

  • 2.6.32 - Linux kernel version.
  • 431.1.2 - Distro specific number for bug and security fixes.

Here is another output from my Ubuntu based server:

uname -r
3.2.0-51-generic

The following command gives a little more information about Linux kernel and machine type:

 
uname -mrs
 

Sample outputs:

Linux 3.2.0-51-generic x86_64

A list uname command line options

  -a, --all                print all information, in the following order, except omit -p and -i if unknown:
  -s, --kernel-name        print the kernel name
  -n, --nodename           print the network node hostname
  -r, --kernel-release     print the kernel release
  -v, --kernel-version     print the kernel version
  -m, --machine            print the machine hardware name
  -p, --processor          print the processor type or "unknown"
  -i, --hardware-platform  print the hardware platform or "unknown"
  -o, --operating-system   print the operating system

How to check kernel version using /proc/version file

Use the cat command to look at /proc/version file:

 
cat /proc/version
 

Sample outputs:

Linux version 3.2.0-51-generic (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #77-Ubuntu SMP Wed Jul 24 20:18:19 UTC 2013

Related media

This tutorial is also available in a quick video format:



Video 01: Find The Linux Kernel Version Command Tutorial

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 0 comments… add one now }

Leave a Comment

Tagged as: , ,

Previous Faq:

Next Faq: