Windows Subsystem for Linux (WSL) bringing Linux kernel to Windows
Back at the Build conference in May, Microsoft squeezed a little tighter in its embrace of open source: it announced the next major update of the Windows Subsystem for Linux (WSL) would include a complete Linux kernel.
No emulation here. A real Linux kernel.
Tagged with a 2 like a budding entertainment franchise, WSL 2 allows many more Linux applications and tools to run on Windows. Plus, it will exhibit the behavior expected from pure Linux environments. The previous version of WSL was a compatibility layer between Windows and Linux that provided functionality via an emulator. WSL 2 uses virtualization with Hyper-V to provide a native Linux experience. It is based on the 4.19 long-term-support (LTS) release of the Linux kernel, and will be based on the latest LTS release in the future to ensure stability. The team behind WSL 2 will maintain the kernel through Windows updates, so you won’t have to manage it yourself.
According to initial testing by WSL 2 developers: “File intensive operations like git clone, npm install, apt update, apt upgrade, and more will all be noticeably faster. The actual speed increase will depend on which app you’re running and how it is interacting with the file system. Initial tests that we’ve run have WSL 2 running up to 20× faster compared to WSL 1 when unpacking a zipped tarball, and around 2–5× faster when using git clone, npm install, and cmake on various projects.”
Bringing Docker into the fold
Notably, Docker, the platform that popularized containers, will run on WSL 2, as will the container orchestration tool Kubernetes. Many Windows users who work with Docker use Docker Desktop for Windows, which runs on its own Hyper-V VMs and LinuxKit. However, Docker has been working with Microsoft to rebuild Docker Desktop for Windows on WSL 2 to make the most of the performance boosts offered by the full Linux kernel. This update will help further erode physical and software barriers for developers working on containerized applications.
Docker has come a long way with Microsoft since it was first supported on Azure five years ago. Furthering Docker support across Microsoft’s products demonstrates Microsoft’s commitment to making itself the go-to solution for all developers across all disciplines. As the last few years have shown, Microsoft loves open source and Linux.
How to get WSL 2
WSL 2 is currently available to participants in the Windows Insiders program. Blogs about the latest updates to the subsystem can be found on the Windows Command Line Tools for Developers blogs, and details about each WSL 2 release can be found on GitHub. You can also submit issue tickets or pull requests for WSL 2 on the WSL GitHub page. A date for the full release of WSL 2 has not been announced yet.
If you’re a fan of the first WSL, let us know what you think of WSL 2 and what you hope to see in it in the comments section below, or on Twitter and Facebook.
If you enjoyed this post, we think you’ll also like: