我们离不开的 Linux 内核模块
内核 模块 Linux

> 
> 开源爱好者们对他们所喜爱的 Linux 内核模块进行了评价。
> 
> 
> 


![](/data/attachment/album/202109/03/065649hik5hjiiy3htj589.jpg "Linux keys on the keyboard for a desktop computer")


Linux 内核今年就要满 30 岁了! 如果你像我们一样对此特别重视，那么让我们本周用几个特别的文章来庆祝 Linux。


今天，我们先来看看来自社区对“**你不能没有哪个 Linux 内核模块？为什么？**”的回答，让我们听听这 10 位爱好者是怎么说的。


### #1


我猜一些内核开发者听到我的回答后会尖叫着跑开。不过，我还是在这里列出了两个最具争议性的模块：


* 第一个是 NVIDIA，因为我的工作笔记本和个人台式机上都有 NVIDIA 显卡。
* 另一个可能产生的仇恨较少。VMware 的 VMNET 和 VMMON 模块，以便能够运行 VMware Workstation。


— [Peter Czanik](https://opensource.com/users/czanik)


### #2


我最喜欢的是 [zram](https://en.wikipedia.org/wiki/Zram) 模块。它在内存中创建了一个压缩块设备，然后它可以作为交换分区使用。在内存有限的情况下（例如，在虚拟机上），还有如果你担心频繁的 I/O 操作会磨损你的 SSD 或者甚至更糟糕的基于闪存的存储，那么使用基于 zram 的交换分区是非常理想的。


— [Stephan Avenwedde](https://opensource.com/users/hansic99)


### #3


最有用的内核模块无疑是 snd-hda-intel，因为它支持大多数集成声卡。我可以一边听音乐，一边在 Linux 桌面上编码一个音频编曲器。


— [Joël Krähemann](https://opensource.com/users/joel2001k)


### #4


如果没有我用 Broadcom 文件生成的 kmod-wl，我的笔记本就没有价值了。我有时会收到关于内核污染的信息，但没有无线网络的笔记本电脑有什么用呢？


— [Gregory Pittman](https://opensource.com/users/greg-p)


### #5


我不能没有蓝牙。没有它，我的鼠标、键盘、扬声器和耳机除了用来挡住门板还有啥用？


— [Gary Smith](https://opensource.com/users/greptile)


### #6


我要冒昧地说 *全* 都是。 说真的，我们已经到了随机拿一块硬件，插入它，它就可以工作的地步。


* USB 串行适配器能正常工作
* 显卡可以使用（尽管可能不是最好的）
* 网卡正常工作
* 声卡正常工作


所有这些模块整体带来大量可以工作的驱动程序，令人印象深刻。我记得在过去那些糟糕的日子里，我们曾经大喊 xrandr 魔法字符串才能来使投影仪工作。而现在，是的，当设备基本不能正常工作时，才真的罕见。


如果我不得不把它归结为一个，那就是 raid6。


— [John 'Warthog9' Hawley](https://opensource.com/users/warthog9)


### #7


对于这个问题，我想回到 20 世纪 90 年代末。我是一家小公司的 Unix 系统管理员（兼任 IS 经理）。我们的磁带备份系统死了，由于“小公司”预算有限，我们没有急于更换或现场维修。所以我们必须得把它送去维修。


在那两个星期里，我们没有办法进行磁带备份。没有一个系统管理员愿意处于这种境地。


但后来我想起了读过的 [如何使用软盘磁带机](https://tldp.org/HOWTO/Ftape-HOWTO.html)，我们刚好有一台刚换下来的塔式电脑，它有一个软盘磁带机。


于是我用 Linux 重新安装了它，设置了 ftape 内核驱动模块，进行了一些备份/恢复测试，然后将我们最重要的备份运行到 QIC 磁带上。在这两个星期里，我们依靠 ftape 备份重要数据。


所以，对于那些让软盘磁带机在 1990 年代的 Linux 上工作的无名英雄，你真是太厉害了！


— [Jim Hall](https://opensource.com/users/jim-hall)


### #8


嗯，这很简单。是 kvm 内核模块。就个人而言，我无法想象在没有虚拟机的情况下完成日常工作。我愿意相信我们大多数人都是这样。kvm 模块在使 Linux 成为云战略的核心方面也发挥了很大作用。


— [Gaurav Kamathe](https://opensource.com/users/gkamathe)


### #9


对我来说，是 dm-crypt，它是用于 LUKS 的。参见：


* <https://www.redhat.com/sysadmin/disk-encryption-luks>
* <https://manpages.debian.org/unstable/cryptsetup-bin/cryptsetup.8.en.html>


知道别人无法看到你的磁盘上的内容是非常棒的，例如，如果你的笔记本丢失或被盗时。


— [Maximilian Kolb](https://opensource.com/users/kolb)


### #10


对于密码学基础，很难超越 crypto 模块和它的 C API，它是如此简洁明了。


在日常生活中，还有什么比蓝牙提供的即插即用更有价值的吗？


— [Marty Kalin](https://opensource.com/users/mkalindepauledu)


在评论中与我们分享。你的生活中不能没有什么 Linux 内核模块？




---


via: <https://opensource.com/article/21/8/linux-kernel-module>


作者：[Jen Wike Huger](https://opensource.com/users/jen-wike) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
The Linux kernel is turning 30 this year! If you're like us, that's a big deal and we are celebrating Linux this week with a couple of special posts.

Today we start with a roundup of responses from around the community answering "What Linux kernel module can you not live without? And, why?" Let's hear what these 10 enthusiasts have to say.

I guess some kernel developers will run away screaming when they hear my answer. Still, I list here two of the most controversial modules:

- First is NVIDIA, as I have an NVIDIA graphics card on my work laptop and my personal desktop.
- The other one probably generates less hatred—the VMNET and VMMON modules from VMware to be able to run VMware Workstation. —
[Peter Czanik](https://opensource.com/users/czanik)

My favorite is the [zram](https://en.wikipedia.org/wiki/Zram) module. It creates a compressed block device in memory, which can then be used as a swap partition. Using a zram-based swap partition is ideal when memory is limited (for example, on virtual machines) and if you are worried about wearing out your SSD or, even worse, your flash-based storage because of frequent I/O operations. —[Stephan Avenwedde](https://opensource.com/users/hansic99)


The most useful kernel module is definitively snd-hda-intel since it supports most integrated sound cards. I listen to music while coding an audio sequencer on the Linux desktop. —[Joël Krähemann](https://opensource.com/users/joel2001k)

My laptop would be worthless without the kmod-wl that I generate with the Broadcom file. I sometimes get messages about tainting the kernel, but what good is a laptop without wireless? —[Gregory Pittman](https://opensource.com/users/greg-p)

I can't live without Bluetooth. Without it, my mouse, keyboard, speakers, and headset would be doorstops. —[Gary Smith](https://opensource.com/users/greptile)

I'm going to go out on a limb and say *all of them*. Seriously, we've gotten to the point where I grab a random piece of hardware, plug it in, and it just works.

- USB serial adapter just works
- Video card just works (though maybe not at its best)
- Network card just works
- Sound card just works

It's tough not to be utterly impressed with the broad scope of the driver work that all the modules bring to the whole. I remember the bad old days when we used to yell out xrandr magic strings to make projectors work, and now—yeah, it's a genuine rarity when stuff doesn't (mostly) just work.

If I had to nail it down to one, though, it'd be raid6. —[John 'Warthog9' Hawley](https://opensource.com/users/warthog9)

I'm going to go back to the late 1990s for this one. I was a Unix systems administrator (and double duty as IS manager) for a small company. Our tape backup system died, and because of "small company" limited budgets, we didn't have a rush replacement or onsite repair on it. So we had to send it in for repair.

During those two weeks, we didn't have a way to make tape backups. No systems administrator wants to be in that position.

But then I remembered reading the [Floppy Tape How-to](https://tldp.org/HOWTO/Ftape-HOWTO.html), and we happened to have a tower PC we'd just replaced that had a floppy tape drive.

So I reinstalled it with Linux, set up the **ftape** kernel driver module, ran a few backup/recovery tests, then ran our most important backups to QIC tapes. For those two weeks, we relied on **ftape** backups of critical data.

So to the unsung hero out there who made floppy tape drives work on 1990s Linux, you are awesome! —[Jim Hall](https://opensource.com/users/jim-hall)

Well, that's easy. It's the kvm kernel modules. On a personal front, I cannot imagine doing my day-to-day work without VMs. I'd like to believe that's the case with most of us. The kvm modules also play a big part in making Linux central to the cloud strategy. —[Gaurav Kamathe](https://opensource.com/users/gkamathe)

For me, it's dm-crypt, which is used for LUKS. See:

[https://www.redhat.com/sysadmin/disk-encryption-luks](https://www.redhat.com/sysadmin/disk-encryption-luks)[https://manpages.debian.org/unstable/cryptsetup-bin/cryptsetup.8.en.html](https://manpages.debian.org/unstable/cryptsetup-bin/cryptsetup.8.en.html)

It's fantastic to know others cannot see what's on your disk, for example, if you lose your notebook or it gets stolen. —[Maximilian Kolb](https://opensource.com/users/kolb)

For cryptography basics, it's hard to beat the crypto module and its C API, which is straightforward.

For day-to-day life, is there anything more valuable than the plug-and-play that Bluetooth provides? —[Marty Kalin](https://opensource.com/users/mkalindepauledu)

Share with us in the comments: What Linux kernel module can you not live without?

## 1 Comment