Well here’s a turn up: Microsoft just released the source code for Windows Subsystem for Linux (WSL), making the nifty tech open-source nearly a decade after development began.

The tech giant announced the news at this year’s BUILD event, where it made some other open-source related announcements, including its own CLI text editor called Edit. Source code for WSL was quickly made available on the Microsoft GitHub.

For those not familiar with it, WSL is a specialised virtualisation setup that lets Windows users run Linux distributions (like Ubuntu) inside of Windows, with tight system, software and hardware integration.

WSL was designed to allow developers who didn’t want to run a full Linux distro, but needed to work with Linux tools, to do so. Making it easier for people to use Linux is net-positive since it brings more people into open-source communities.

Microsoft says it decided to open-source the technology to drive it forward, allowing the community that has coalesced around the tech since its introduction to get more involved in developing, shaping and improving it.

“WSL could never have been what it is today without its community,” Microsoft’s Pierre Boulay says in today’s announcement, adding:

We’ve seen how much the community has contributed to WSL without access to the source code, and we can’t wait to see how WSL will evolve now that the community can make direct code contributions to the project

Microsoft’s Pierre Boulay

While a few parts of WSL had already been open-sourced, including wslg (which allows GUI Linux apps to run on the Windows desktop), and the WSL 2 Linux kernel (yes, Microsoft maintains its own custom Linux kernel for Windows – still boggles the mind, that).

Newly open-sourced components include the various command-line executables which interact with WSLl the WSL service handling VM management, distro booting, networking, mounting share points, etc; along with init and process daemons.

Not everything related to WSL has been open-sourced.

A couple of components used in WSL 1 (the initial version that didn’t run on top of a Linux kernel – see below) remain proprietary for now. Given WSL 2 is the current version, is faster, and far more capable, that’s no great loss tbh!

Windows Subsystem for Linux Evolution

Ubuntu running on Windows 11 through WSL

WSL has evolved significantly since its introduction in 2016 (initially known as Bash on Windows).

The initial WSL was a translation and compatibility layer, translating Linux system to Windows NT ones. Performance was decent, and it proved popular. The fact it wasn’t actually Linux meant the scope of its potential was limited.

Enter WSL 2, released in 2019. This shifted to running on top of a full Linux kernel, thereby bringing full system call support, greater performance and much improved compatibility. GPU acceleration followed, along with the ability to run GUI Linux apps on Windows vis WSL 2.

In 2021, Microsoft decoupled WSL from Windows to allow new versions of WSL to be released on the Windows Store, more often, independent of Windows’ release cadence.

This year, the way distros can be installed in WSL was greatly improved, allowing images to be hosted outside the Windows Store (e.g., a custom distro hosted locally) using a new tar-based format – and Ubuntu took advantage straight away!

More details on WSL be found via the WSL GitHub page, which contains the source code ready and waiting for those looking to build it by hand.