linux kernel的版本号一直是w.y.x的形式,其中w代表内核版本号,y代表major revision号,x代表minor revision号。
但是它们的含义在2.6内核之后有所改变,在3.0中使用了新的含义。
在1.0和2.6(2003年发布)时期,其含义:
w代表内核版本号,只有内核发生重大改变的时候,才会增加计数。
x代表major revision号,同时,linux kernel在这一时期使用odd-even策略,x奇数代表不稳定的版本,偶数代表稳定的版本,当有一个新的不稳定版本发布的时候,就会增加它的计数,同时,当版本稳定后,就会再次增加计数。
y代表minor revision号,当有新的feature或者driver添加到内核的时候,就会增加计数。
2.6内核版本一致持续到2.6.39(2011年)。
参考:
http://www.linfo.org/kernel_version_numbering.html
在2.6发布时候,情况发生了一些改变,开发组觉得odd-even策略会导致开发周期过长,于是放弃了odd-even策略,x奇数和偶数不再有不稳定和稳定的含义。在这之后,当有新的feature添加到内核之中的时候,直接在x中增加计数。
为了区分这种策略的变更,linux kernel在2011直接发布了linux kernel 3.0,因此linux kernel 3.0是一个分水岭。
于是,现在的版本号含义:
w仍任代表内核版本号,当x看起来太大的时候,就会增加w计数。
x代表major revision号,当有新的feature或driver添加的时候,增加计数。
y代表minor revision号,当发布了新的patch修复bug的时候,增加计数。
在某些时候,还会有第四个数字,用来代表一个预发布版本,例如rc1,rc2等。第四个数字使用-隔开。
参考:
https://www.kernel.org/category/releases.html
另外,在一些发行版本的linux操作系统中,其内核版本号还包含了第四个数字,这四个数字可能用来表示ABI号,ubuntu就是这样做的。
参考:
https://askubuntu.com/questions/843197/what-are-kernel-version-number-components-w-x-yy-zzz-called
总结:
linux kernel的版本主要有3个时期:
测试时期:版本号以0开头,例如0.01,0.02,0.03,0.11,0.12(第一个GPL协议版本),0.95,0.96,0.97,0.98,0.99等,从0.95版本开始,每个版本之间包含了大量的补丁。在经过了测试时期之后,正式发布了1.0版本(1994.3)。
1.0和2.6版本之前:版本号形式:w.y.x。w代表linux内核版本号,重大特性改变,增加计数;y代表major revision号,奇数代表不稳定版本,偶数代表稳定版本;x代表minor revision号,新的特性或驱动的添加都会增加计数。
2.6之后(即发布3.0版本的时候):版本形式:w.y.x。w代表linux内核版本号,当y数字过大的时候,就增加w计数;y代表major revision号,当有新的特性添加的时候,就会增加y计数;x代表minor revision号,当有patch修复bug的时候,就增加计数。
The Linux kernel has had three different numbering schemes. To summarize:
* The first scheme was used in the run-up to "1.0". The first versionof the kernel was 0.01. This was followed by 0.02, 0.03, 0.10, 0.11,0.12 (the first GPL version), 0.95, 0.96, 0.97, 0.98, 0.99 and then 1.0.[303] From 0.95 on there were many patch releases between versions.
* After the 1.0 release(1994.3) and prior to version 2.6, the number wascomposed as "a.b.c", where the number "a" denoted the kernel version,the number "b" denoted the major revision of the kernel, and thenumber "c" indicated the minor revision of the kernel.
* In 2004, after version 2.6.0 was released, the kernel developers heldseveral discussions regarding the release and versionscheme[304][305] and ultimately Linus Torvalds and others decidedthat a much shorter "time-based" release cycle would be beneficial.
-----------from wiki linux kernel history