Starting this summer, Microsoft will include a custom Linux kernel to support the latest Windows Subsystem Linux (WSL) version. This marks the first time Linux is included as a component in Windows.
WSL2’s kernel will be completely opensource! When WSL2 is published, guidelines for developing your WSL engine will be provided on Github. Microsoft will release more info within weeks.
This is an exciting day for all of us on the Linux team at Microsoft and we are thrilled to be able to tell you a little bit about it, says Jack Hammons, Program Manager, Linux Systems Group @Microsoft
For those new to WSL…
WSL 2 is a new architectural version that enables Linux to run ELF64 Linux binaries on Windows. This modern architecture changes how these Linux binaries interact with Windows and hardware on your computer, but still provides the same user experience as WSL 1 (the current widely available version). Individual Linux distros can be run either as WSL 1 distro or as WSL 2 distro, can be upgraded or downgraded at any time, and WSL 1 and WSL 2 distros can run side by side. WSL 2 uses an entirely new architecture, using a real Linux kernel.
Here’s a WSL 2 demo in action. When we start a distro, we get access to a working bash shell in less than two seconds and immediately run services and apps like dockers.
Windows Terminal comes through the Microsoft Store in Windows 10 and is frequently updated to ensure you are always up to date and can make the recent changes with minimal effort.
Tuned for WSL
As with WSL1, WSL2 will not provide any binaries for the user’s space, instead, the Microsoft kernel interfaces with userspace selections from the user. This generally comes via Windows store installation but can also be “sideloaded” by creating a customized distribution package.
Initially, the kernel itself focuses on version 4.19, Linux’s latest safe long-term release. Apart from Kernel.org’s LTS source, several local patches are introduced. These modifications modify the resulting binary to be used in WSL2 by improving start times, reducing storage footprint, and aggregating a minimum amount of approved applications. The end is a small, lightweight computer intended for WSL2 to substitute the WSL1 model emulation software.
The WSL kernel is constructed using Microsoft’s CI / CD technologies and maintained by Windows Update in a user-friendly procedure. The kernel will remain up-to-date with the recent Linux secure branch characteristics and fixes. They mirror repositories locally to guarantee their source provenance.
One of Linux’s excellent stuff is its robust, backward-compatible system call interface. This will allow them to send Linux’s recent stable branch to all WSL2 variants.
WSL 2 will be launched by the end of June 2019 for Windows insider customers. If you are interested in working with Linux in Microsoft, visit this work listing.