What to Expect with Microsoft's Windows Subsystem for Linux 2

Released with the Windows 10 Insider Preview, the new architecture looks to deliver a faster file system performance, among other new and improved features.

On May 6, 2019, Microsoft announced that it would release the second generation of Windows Subsystem for Linux (WSL) by the end of June 2019. This week the company made good on that promise by announcing the release of Windows 10 Insider Preview Build 18917, which includes WSL 2, among other new features. In this article, I'll first recap what the first generation of WSL (WSL 1) was and what it delivered, and then I'll delve into the details and new features that WSL 2 is expected to bring to the table.

WSL 1 allowed Linux binary executables to run natively on Windows 10 and Windows Server 2019. WSL was designed to run inside a console on a Windows system; from this console, many popular Linux commands and programs could be run, and could also interact (albeit in a somewhat limited basis) with Windows files. For the first release of WSL, Microsoft wrote a Linux-compatible kernel interface that didn't contain any Linux kernel code.

WSL 1 was released with the Windows 10 Anniversary Update in August 2016, which only supported running an Ubuntu Linux image. Then, in October 2017 with the Fall Creators Update, Microsoft moved the installation process for Linux distributions to the Windows Store and allowed SUSE images, as well. Now the Windows Store shows 11 different versions of Linux that can be used with WSL 1, including two Linux distributions that were created to run exclusively on WSL 1.

Although many users found WSL 1 to be an extremely useful tool, it did have its limitations and Microsoft kernel engineers found it difficult to increase the performance and syscall compatibility of WSL 1 with Linux -- and this is where WSL 2 comes into the picture to address these issues and limitations.

WSL 2 runs native Linux machines on Microsoft's new lightweight Hyper-V VM technology that was originally designed for containerization. This new technology allows a virtualized kernel to make direct use of NT primitives on a Windows system.

As WSL 2 will be running actual Linux kernels, it should have full syscall compatibility and a huge increase in performance compared to WSL 1. Interestingly enough, this will be the first time a Linux kernel is shipped with Windows as Microsoft is building its own Linux kernel (based on the Linux 4.19 kernel) that will ship with the initial release of WSL 2. Although this kernel has been optimized to work with WSL2, other Linux distributions will also be taking advantage of WSL 2; for instance, on the same day that Microsoft announced WSL 2, Canonical announced that WSL 2 will have full support for Ubuntu.

Microsoft has made some bold claims for WSL 2: it will be able to run Docker containers natively without needing a separate VM; in certain tests, it has seen a 20x increase in speed from WSL 1 and overall WSL 2 will be two to five times faster than its predecessor; and it should only take about 2 seconds to boot.

About the Author

Tom Fenton has a wealth of hands-on IT experience gained over the past 25 years in a variety of technologies, with the past 15 years focusing on virtualization and storage. He currently works as a Technical Marketing Manager for ControlUp. He previously worked at VMware as a Senior Course Developer, Solutions Engineer, and in the Competitive Marketing group. He has also worked as a Senior Validation Engineer with The Taneja Group, where he headed the Validation Service Lab and was instrumental in starting up its vSphere Virtual Volumes practice. He's on Twitter @vDoppler.