On Ubuntu, the string returned by uname -r is always of the form x.y.0-z-generic (i.e., 3.19.0-21-generic). Compiling Ubuntu's kernel ends up with a string that is of the form x.y.z (i.e., 3.19.8), the actual version of the kernel that is used. What does the z represent in the first case? Is that the EXTRAVERSION parameter or is it something else? How do I get the version string of my build of Ubuntu to match the official one?


It is the ABI number. The following link should help answer your question:


From the Kernel/FAQ:

What differentiates the Ubuntu Kernel from the upstream Linux Kernel?

Ubuntu kernels are rebased against stable releases only through the development cycle, with many patches on top of the stable tag. Once the final release is made the master branch is never rebased again. While stable updates (post release) are usually applied, we sometimes make patch decisions that are counter to the stable releases.

So, the best one could say is that Ubuntu kernels are only loosely based on upstream stable. You'd have to examine the changelog to know exactly what goes into a particular kernel.

With every Ubuntu kernel release, we attempt to remain as true to the upstream Linux kernel as possible. However, there are inevitable patches which we carry on top of the upstream Linux kernel which differentiates the Ubuntu kernel from the upstream Linux kernel. This document attempts to describe the general set of patches which are carried and why: Kernel/FAQ/UbuntuDelta

What does a specific Ubuntu kernel version number mean?

The official version of an Ubuntu kernel tells you a number of things, including the base upstream version, the current Ubuntu ABI identifier and the kernel flavour. (See How can we determine the version of the running kernel? to find your current version number.)

Given a version like 2.6.35-6.9-generic this can be broken into four parts as below:

<base kernel version>-<ABI number>.<upload number>-<flavour>

The base kernel version represents the mainline version on which the Ubuntu kernel is based. The ABI number represents significant changes in the kernel Application Binary Interface. The upload number is a monotonically increasing counter for each upload of this base version. The flavour indicates which kernel configuration variant this is (See What is a Kernel Flavour?).

How can we determine the version of the running kernel?

The official version of an Ubuntu kernel is found in the /proc/version_signature file. This file contains both the full Ubuntu version of the kernel and the mainline version on which it is based. The first field is always Ubuntu, the second field is the Ubuntu kernel version, and the final field is the upstream version:

$ cat /proc/version_signature
Ubuntu 2.6.35-6.9-generic 2.6.35-rc3
  • Is it part of the "local version" parameter that is appended to the kernel release? If so, then why is not in the default configuration used by Ubuntu? And why is the kernel version that is found in the version string different than the actual kernel version used? – Melab Jun 18 '15 at 3:37
  • @Melab that is a good question. I am really not sure on that one. I believe I am going to have to do some research into that. :) – Terrance Jun 18 '15 at 3:46
  • Yeah. I expect the source code that I download to be an exact copy of what the official release uses. – Melab Jun 18 '15 at 3:50
  • @Melab that is a great question! +1 for you! I am doing all the research I can to help find an answer for you! Thank you for the challenge! :-) – Terrance Jun 18 '15 at 4:10
  • @Melab I think I found something. Look at debian-handbook.info/browse/stable/sect.kernel-compilation.html and go to section 8.10.4. – Terrance Jun 18 '15 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.