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

6,945

Solution 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

Solution 2

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

Share:
6,945
Mike
Author by

Mike

Have a BS in computer science from SIUE Worked @ Motorola for 6 years as an embedded systems software engineer Currently reside in OH working for Emerson as a software engineer

Updated on September 18, 2022

Comments

  • Mike
    Mike over 1 year

    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?

  • austinmarton
    austinmarton almost 9 years
    Alternatively head Makefile from top level of kernel source
  • Th. Thielemann
    Th. Thielemann over 3 years
    Or strings vmlinux | grep "Linux Version"