Microsoft Adds Windows Subsystem for Linux 2 Support in Windows 10 Versions 1903 and 1909
Microsoft announced on Thursday that it has backported support for Windows Subsystem for Linux (WSL) version 2 into Windows 10 versions 1903 and 1909.
WSL is a Windows 10 component that permits Linux-based tools to be run on Windows 10 systems, such as developer tools. Various Linux distributions (such as Debian, SUSE, Ubuntu and more) will work with WSL, as listed in this WSL "Installation Guide." However, WSL is "agnostic" when it comes to which Linux distro is used.
WSL version 2 will work only with Windows 10 versions 1903 and 1909 if those OSes are installed on x64 systems. Additionally, having the latest OS updates in place is a requirement.
Users of Windows 10 versions 1903 and 1909 can check if their OS is eligible to add WSL version 2 by running the "Winver" command that's built into Windows. It'll display a popup box showing the build number followed by a period and the minor build number. Specifically, the minor build number of Windows 10 needs to be at 1049 or higher to be eligible. Microsoft's example is "Build 18362.1049," where "1049" is the minor build number.
Organizations using Windows 10 version 2004 on ARM64 systems already have access to WSL version 2.
Microsoft doesn't have plans to backport WSL version 2 to Windows 10 version 1809, according to an Aug. 20 Twitter post by Mitchell Minkoff, a security specialist associated with Microsoft's announcement.
WSL Version 2 Perks
WSL version 2 is notable for file system performance improvements over WSL version 1. The file system performance with WSL version 2 is "now on par with Mac and Linux speeds," Microsoft's announcement claimed. WSL version 2 also has improved "system call support for all Linux applications."
Notably in that respect, WSL version 2 will let users run the Docker Desktop OS virtualization solution for containers.
"As of today, Docker Desktop Edge users will be able to use Docker Desktop with WSL 2 rather than our legacy HyperV based backend," a Thursday Docker blog post explained. "This is available not only for Windows Pro and Windows Enterprise, but also for Windows Home users. This is the first time that Docker has been available on Windows Home versions 1903 and 1909!"
This kind of support comes as a result of Microsoft building a "full Linux kernel into WSL 2," Microsoft explained. In contrast, WSL version 1 uses a Linux emulation environment, rather than a true Linux kernel.
While it may seem better to use WSL version 2 because it's faster, Microsoft admits that WSL version 1 is faster in some cases, as described in this "Comparison" document. WSL version 1 is faster if the user wants to access project files that were saved to the Windows file system. WSL version 1 is also faster when "using Windows applications to access Linux files."
When using WSL version 2, it's optimal to save project files using the Linux file system, which enhances performance, the document explained. WSL version 2 also gives users a "managed VM" -- that is, they don't have to maintain the virtual machine that's used with the subsystem.
VS Code Extension
Another way to store project files on the Linux file system using WSL is to use an extension in VS Code, which is Microsoft's browser-based integrated development environment. VS Code lets users develop and debug in a Linux-based environment while using Windows 10, Microsoft explained, in this Visual Studio Code document.
There's a list of "WSL Tips and Tricks" available at this page. It's based on community efforts and was compiled by Craig Loewen, a program manager at Microsoft on the WSL team.
Kurt Mackie is senior news producer for 1105 Media's Converge360 group.