Is the version of the linux kernel listed in the source some where?

1

1

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?

Mike

Posted 2012-11-12T17:28:47.133

Reputation: 849

Answers

1

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

hymie

Posted 2012-11-12T17:28:47.133

Reputation: 1 011

1

In 4.0, you can run:

make kernelversion

Sample output:

4.0.0

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

Ciro Santilli 新疆改造中心法轮功六四事件

Posted 2012-11-12T17:28:47.133

Reputation: 5 621

1Alternatively head Makefile from top level of kernel source – austinmarton – 2015-07-23T07:58:57.790