Linux – What’s the difference between “uname -r” and “uname -v”

centoslinuxmanpagesunix

I am using CentOS 6.2. In the man page of uname (i.e., man uname), it says:

 -r, --kernel-release
              print the kernel release

 -v, --kernel-version
              print the kernel version

While trying the command, it shows

[max@localhost ~]$ uname -r

2.6.32-220.17.1.el6.i686

[max@localhost ~]$ uname -v

#1 SMP Tue May 15 22:09:39 BST 2012

-v should show the version, right? But where is it showing the version? -r is showing the version detail.

Why is this so?

Best Answer

This is absolutely normal and expected. kernel-release will always show the actual version number of the used kernel. kernel-version however will print a more specific string with the actual release date. Its format depends on which Linux or Unix distribution it's run on.


You can find an extensive list of examples on Wikipedia. For example, in OS X, the kernel-version will be not only the release number, but also the release date:

Darwin Kernel Version 10.8.0: Tue Jun  7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64

While the kernel-release is simply the release number:

10.8.0

You can even check /proc/sys/kernel/ for the things uname(2) will look up when it's called by uname(1). This would be:

  • /proc/sys/kernel/version
  • /proc/sys/kernel/osrelease

Don't think too strictly of "version" as just a version number.

Related Question