1

Suppose I have a particular release of Ubuntu (say Ubuntu 12.04.5 LTS - Precise Pangolin). The kernel it uses is 3.13.0-32-generic x86_64. Where exactly does this version number come from? It is clearly not mainline kernel version 3.13. By looking at /usr/include/linux/version.h in 12.04.5 I found LINUX_VERSION_CODE 197199 that translates to 3.2.79, which looks more plausible, but there is also mainline v3.2.79-precise which seems to correspond to v3.2.79. Is this equivalent to 12.04.5s 3.13.0-32 kernel?

How can I find out the exact mainline kernel, a particular version of Ubuntu is based on? I'm interested in finding out how to get to this 3.13.0-32 using the exact mainline kernel commit it uses.

2 Answers2

2

uname -a or uname -r might be what you are looking for. See also this question and the man page for uname.

John P
  • 231
1

From John Ford's comment to an answer in NObert's link, the mapping you want is Ubuntu kernel to mainline map
According to that, your 3.13.0-32 Ubuntu kernel is mainline 3.13.11.4

ubfan1
  • 17,838
  • so ignore LINUX_VERSION_CODE 197199 in /usr/include/linux/version.h? The closest I could find in the kernel git is v3.13.11 omitting the 4. – Kuravi H Sep 06 '18 at 16:00