简体   繁体   English

Linux kernel 版本号?

[英]Linux kernel version numbers?

I'm somewhat confused on the Linux kernel version numbers.我对 Linux kernel 版本号有些困惑。 I noticed that many Linux distributions do no use the latest Kernels, in fact I have seen a few using version 2.4.我注意到许多 Linux 发行版不使用最新的内核,事实上我已经看到一些使用 2.4 版。 Is there a reason for this?是否有一个原因? Is there any differences between 2.4, 2.6, 3.2 apart from age? 2.4、2.6、3.2除了年龄有区别吗? What are the security implications of using an older kernel?使用较旧的 kernel 有哪些安全隐患?

Different kernels have different features and improvements the developers of a distribution take a look at features they are going to support then decide which kernel to use based on the most stable support of that kernel.不同的内核具有不同的特性和改进,发行版的开发人员查看他们将支持的特性,然后根据对 kernel 的最稳定支持来决定使用哪个 kernel。

It is the decision of the distribution developer which one to use, and they would go with the one they felt comfortable with.使用哪一个是发行版开发人员的决定,他们会 go 使用他们觉得舒服的那个。

This is a feature of software development its like asking what Java 1.1 and Java 1.7 is and whats the difference is apart from age... the answer is many things.这是软件开发的一个功能,就像问 Java 1.1 和 Java 1.7 是什么,除了年龄之外有什么区别……答案有很多。

Most kernels and software will also have a security patch schedule and it is up to the user to keep their systems patched and up to date if you do not then you invite security issues as they are never fixed.大多数内核和软件也将有一个安全补丁计划,由用户来保持他们的系统补丁和更新,如果你不这样做,那么你会引发安全问题,因为它们永远不会被修复。

between major releases (eg 2.4 and 2.6), new features are introduced and old features are deprecated, eventually making the kernel binary incompatible.在主要版本(例如 2.4 和 2.6)之间,引入了新功能并弃用了旧功能,最终导致 kernel 二进制文件不兼容。

this is important if you depend on some kernel-module that is not part of the mainline kernel (eg it is proprietary and the original authors don't provide updated modules; or it is open source (but never made it into the kernel) and nobody is willing to spend time to migrate the code)如果你依赖一些不属于主线 kernel 的内核模块(例如,它是专有的,原作者不提供更新的模块;或者它是开源的(但从未进入内核)),这一点很重要没有人愿意花时间迁移代码)

also a new major release might change the system behaviour significantly.新的主要版本也可能会显着改变系统行为。 i remember that when switching from 2.4 to 2.6, many people that needed low latency audio (that's my background, so forgive me) would stay with the old kernel, since the new scheduling algorithms performed worse in some situations.我记得当从 2.4 切换到 2.6 时,许多需要低延迟音频的人(这是我的背景,请原谅我)会继续使用旧的 kernel,因为新的调度算法在某些情况下表现更差。

I hope the below page would help us in understanding the linux version numbering system: http://www.linfo.org/kernel_version_numbering.html我希望下面的页面能帮助我们理解 linux 版本编号系统: http://www.linfo.org/kernel_version_numbering.html

A snap from http://www.tldp.org/FAQ/Linux-FAQ/kernel.html#linux-versioning快照来自http://www.tldp.org/FAQ/Linux-FAQ/kernel.html#linux-versioning

Linux version numbers follow a longstanding tradition. Linux 版本号遵循悠久的传统。 Each version has three numbers, ie, XYZ The "X" is only incremented when a really significant change happens, one that makes software written for one version no longer operate correctly on the other.每个版本都有三个数字,即 XYZ。“X”仅在发生真正重大的变化时递增,这种变化使得为一个版本编写的软件不再能在另一个版本上正常运行。 This happens very rarely -- in Linux's history it has happened exactly once.这种情况很少发生——在 Linux 的历史上它只发生过一次。

The "Y" tells you which development "series" you are in. A stable kernel will always have an even number in this position, while a development kernel will always have an odd number. “Y”告诉您您处于哪个开发“系列”。稳定的 kernel 在这个 position 中总是有偶数,而开发 kernel 总是有奇数。

The "Z" specifies which exact version of the kernel you have, and it is incremented on every release. “Z”指定您拥有的 kernel 的确切版本,并且在每次发布时递增。

There is a human-readable changelog for the Linux Kernel . Linux Kernel 有一个人类可读的变更日志

Some people take the attitude "if it works - don't change it".有些人的态度是“如果它有效 - 不要改变它”。 So, there are security implications of running an older kernel - but there's also the risk that upgrading may break something.因此,运行较旧的 kernel 存在安全隐患——但也存在升级可能会破坏某些内容的风险。

As kernels improve/change, they might break expectations that held on earlier versions.随着内核的改进/更改,它们可能会打破对早期版本的期望。 If a distribution becomes unstable because too many software breaks under the new version of the kernel, the developers might opt to use an earlier version until the software is able to handle the changes in the new kernel.如果由于新版本 kernel 下有太多软件损坏导致发行版变得不稳定,开发人员可能会选择使用早期版本,直到软件能够处理新 kernel 中的更改。

Typically a binary image may not be portable between kernels where the first or second part of the version number changes.通常,二进制映像可能无法在版本号的第一部分或第二部分发生变化的内核之间移植。 So in order to upgrade from 2.4 to 2.6, a large proportion of libs and executables will need to be upgraded / recompiled too.因此,为了从 2.4 升级到 2.6,很大一部分库和可执行文件也需要升级/重新编译。 This can be a particular problem if you use closed source applications/drivers.如果您使用闭源应用程序/驱动程序,这可能是一个特别的问题。

Most Linux distributors will back port patches from newer kernel versions depending on the security impact / demand for additional functionality.大多数 Linux 发行商将根据安全影响/对附加功能的需求,从较新的 kernel 版本支持端口补丁。 If you're not able to upgrade your entire system at regular intervals, then you need to find a distribution which explicitly supports a long support cycle with a good history of back porting (eg RHEL, SuSE).如果您不能定期升级整个系统,那么您需要找到一个明确支持长支持周期并具有良好的向后移植历史的发行版(例如 RHEL、SuSE)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM