If I'm looking at a version of the linux kernel source code, can I tell which version of the kernel it is?

This is code that's currently not running on any platform (so I can't execute commands), but is there any source file that lists the kernel version?

2 Answers 2


Check /usr/src/linux/.config , header files in /usr/src/linux/include/generated , /usr/src/linux/include/config/kernel.release

If you have a vmlinux file, try strings vmlinux | grep version

  • Or strings vmlinux | grep "Linux Version" Sep 9, 2020 at 12:20

In 4.0, you can run:

make kernelversion

Sample output:


Possible same question on SO: https://stackoverflow.com/questions/12151694/how-to-find-the-version-of-a-linux-kernel-source-tree

  • 2
    Alternatively head Makefile from top level of kernel source Jul 23, 2015 at 7:58

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.