Where do I find the version of a Linux kernel source tree?

Yet another solution: in the older times include/linux/version.h, currently include/generated/uapi/linux/version.h, but only after at least a partially successful compilation.


Check the top-level Makefile, an example of which is here. At the top of that, you should see something like:

VERSION = 3
PATCHLEVEL = 1
SUBLEVEL = 0
EXTRAVERSION = -pax
NAME = Custom Pax Version

The (admittedly minor) advantage of this method is that you only need the ability to view the files themselves rather than having to run a build process.


You can find the version by running

make kernelversion

In the source tree

Tags:

Linux