Where can I find the version of the Linux kernel source tree?

I downloaded only the archive from my source Linux tree from the hardware vendor (there is no git repo metadata), is there any way to find out the kernel version number?

Is the version number usually stored in a file somewhere in the source tree?

I would like to be able to do this without compiling and starting the kernel.

+46
linux
Aug 28 2018-12-12T00:
source share
3 answers

You can find the version by running

make kernelversion 

In the source tree

+74
Aug 28 2018-12-12T00:
source share

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

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

The advantage of this method is that you only need the ability to view the files themselves, and not the build process.

+74
Aug 28 2018-12-12T00:
source share

Another solution: in the old days include/linux/version.h , now include/generated/uapi/linux/version.h , but only after at least partially successful compilation.

+1
Nov 25 '13 at 14:03
source share



All Articles