linux自定义内核_Windows 10将允许您加载自定义Linux内核

linux自定义内核

linux自定义内核

Linux's Tux mascot on a Windows 10 desktop
Larry Ewing
拉里·尤因

Microsoft is adding a Linux kernel to Windows 10 to power the Windows Subsystem for Linux. But, guess what: You don’t have to use Microsoft’s Linux kernel. You can build your own custom Linux kernel for Windows to use.

微软正在向Windows 10添加Linux内核, 以为Windows子系统提供动力。 但是,请猜测一下:您不必使用Microsoft的Linux内核。 您可以构建自己的自定义Linux内核供Windows使用。

This feature is part of the new version of WSL in Insider preview build 18945. This is a 20H1 build, which means it will likely be released in April 2020—it’s unclear if this feature will make it to 19H2, expected for release in October 2019.

此功能是Insider Preview内部版本18945 中WSL新版本的一部分。这是20H1版本,这意味着它可能会在2020年4月发布-尚不清楚此功能是否会使其达到19H2(预计于2019年10月发布)。 。

Microsoft had already added the Linux kernel, but now WSL 2 looks even more powerful than we originally thought. Now, you can do whatever you want with the Linux kernel, including adding kernel modules. You then specify the path to your kernel file in a .wslconfig  file on your system and Windows will automatically load it whenever you launch a Linux system. You don’t have to load a custom kernel—if you don’t, Windows will just use the built-in one.

微软已经添加了Linux内核 ,但是现在WSL 2看起来比我们最初想象的还要强大。 现在,您可以使用Linux内核进行任何操作,包括添加内核模块。 然后,在系统上的.wslconfig文件中指定内核文件的路径,并且Windows将在每次启动Linux系统时自动加载它。 您不必加载自定义内核-如果不需要,Windows将仅使用内置的内核。

As Microsoft’s Craig Loewen, program manager for the Windows Developer Platform, explains:

正如Microsoft Windows Developer Platform程序经理Craig Loewen所解释的那样:

We provide a Linux kernel with WSL 2, and it’s shipped within Windows. However, there may be a case where you want a specific kernel powering your WSL 2 distros, such as using a certain kernel module, etc. You can now use the kernel option in the .wslconfig file to specify a path to a kernel on your machine, and that kernel will be loaded into the WSL 2 VM when it’s started. If no option is specified, you’ll go back to using the Linux kernel provided with Windows as part of WSL 2.

我们提供了带有WSL 2的Linux内核,该内核已在Windows中提供 。 但是,在某些情况下,可能需要特定的内核来为WSL 2发行版提供动力,例如使用某个内核模块等。现在,您可以使用.wslconfig文件中的kernel选项在您的.wslconfig上指定内核的路径。计算机,并且该内核将在启动时被加载到WSL 2 VM中。 如果未指定任何选项,则将返回使用Windows作为WSL 2的一部分提供的Linux内核。

There are more improvements to WSL, too. The entire .wslconfig global configuration file is new, and WSL 2 users can now connect to Linux servers running on their system using localhost .

WSL也有更多改进。 整个.wslconfig全局配置文件是新的,WSL 2用户现在可以使用localhost连接到在其系统上运行的Linux服务器。

This latest insider preview build also features a redesigned Cortana experience, streamlined file search in File Explorer, and customizable text cursor indicator.

最新的内部预览版本还具有重新设计的Cortana体验,在文件资源管理器中简化的文件搜索以及可自定义的文本光标指示器。

Connecting to WSL via localhost on Windows 10
Microsoft 微软

翻译自: https://www.howtogeek.com/434908/windows-10-will-let-you-load-a-custom-linux-kernel/

linux自定义内核