Microsoft announced the WSL2 subsystem with a standard Linux kernel

Microsoft company presented at the Microsoft Build 2019 conference taking place these days, an updated WSL2 (Windows Subsystem for Linux) subsystem designed to run Linux executable files on Windows. Key feature the second edition is the delivery of a full-fledged Linux kernel, instead of a layer on the fly translating Linux system calls into Windows system calls.

Test release of WSL2 will be offered at the end of June in experimental builds Windows Insider. Emulator-based support for WSL1 will be retained and users will be able to use it side by side with WSL2. To run the Linux kernel in a Windows environment, a lightweight virtual machine is used, already used in Azure.

As part of WSL2 for Windows 10, a component with a standard Linux 4.19 kernel will be offered. As fixes for the 4.19 LTS branch are released, the core for WSL2 will be promptly updated through the Windows Update mechanism and tested in the Microsoft continuous integration infrastructure. WSL2 will use the same core as the Azure infrastructure, making it easier to maintain.

All changes prepared for integrating the core with WSL will be published under the free GPLv2 license and will be transferred to the upstream. The prepared patches include optimizations to reduce kernel startup time, reduce memory consumption, and keep the minimum required set of drivers and subsystems in the kernel. The proposed core will be able to act as a transparent replacement for the emulation layer offered in WSL1. The availability of sources will allow enthusiasts to build their own builds of the Linux kernel for WSL2 if desired, for which the necessary instructions will be prepared.

The use of a standard kernel with optimizations from the Azure project will achieve full compatibility with Linux at the system call level and provide the ability to seamlessly run Docker containers on Windows, as well as implement support for file systems based on the FUSE mechanism. In addition, WSL2 significantly improves I/O and file system performance, which used to be the bottleneck of WSL1. For example, when unpacking a compressed archive, WSL2 is 1 times faster than WSL20, and when performing operations
"git clone", "npm install", "apt update" and "apt upgrade" 2-5 times.

Despite shipping a Linux kernel, as before, WSL2 will not provide a ready-made set of user-space components. These components are installed separately and are based on assemblies of various distributions. For example, to install in WSL in the Microsoft Store catalog offered assembly Ubuntu, Debian GNU/Linux, Kali Linux, SUSE и openSUSE. To interact with the Linux kernel offered in Windows, you will need to insert a small initialization script into the distribution kit that changes the boot process. Canonical has already said about the intention to provide full support for running Ubuntu on top of WSL2.

Additionally, it can be noted the publication of terminal emulator by Microsoft Windows Terminal, whose code is distributed under the MIT license. Along with the terminal, the code for the original conhost.exe command-line interface, used in Windows and implementing the Windows Console API, is also open. The terminal provides a tabbed interface and split windows, fully supports Unicode and escape sequences for color output, allows you to change skins and plug-ins, supports virtual consoles (PTY), and uses DirectWrite/DirectX to speed up text rendering. You can use the Command Prompt (cmd), PowerShell, and WSL shells in the terminal. This summer, the new terminal will be available to Windows users through the Microsoft Store.

Microsoft announced the WSL2 subsystem with a standard Linux kernel

Source: opennet.ru

Add a comment