源代码中列出的linux内核版本在哪里?

Mik*_*ike 3 linux documentation source-code version

如果我正在查看某个版本的 linux 内核源代码,我能知道它是哪个版本的内核吗?

这是当前未在任何平台上运行的代码(因此我无法执行命令),但是是否有任何列出内核版本的源文件?

Cir*_*郝海东 5

在 4.0 中,您可以运行:

make kernelversion
Run Code Online (Sandbox Code Playgroud)

示例输出:

4.0.0
Run Code Online (Sandbox Code Playgroud)

关于 SO 的可能相同的问题:https : //stackoverflow.com/questions/12151694/how-to-find-the-version-of-a-linux-kernel-source-tree

  • 或者从内核源代码的顶层```head Makefile``` (2认同)