Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 0 down vote accepted

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

share|improve this answer

In 4.0, you can run:

make kernelversion

Sample output:


Possible same question on SO:

share|improve this answer
Alternatively head Makefile from top level of kernel source – austinmarton Jul 23 '15 at 7:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .