3

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

4

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

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

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

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

You must log in to answer this question.

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