The Windows Subsystem for Linux is now open source

Today we’re very excited to announce the open-source release of the Windows Subsystem for Linux. This is the result of a multiyear effort to prepare for this, and a great closure to the first ever issue raised on the Microsoft/WSL repo: The Windows Subsystem for Linux is now open source appeared first on Windows Blog.

May 19, 2025 - 17:05
 0
The Windows Subsystem for Linux is now open source
Today we’re very excited to announce the open-source release of the Windows Subsystem for Linux. This is the result of a multiyear effort to prepare for this, and a great closure to the first ever issue raised on the Microsoft/WSL repo: Will this be Open Source? · Issue #1 · microsoft/WSL. That means that the code that powers WSL is now available on GitHub at Microsoft/WSL and open sourced to the community! You can download WSL and build it from source, add new fixes and features and participate in WSL’s active development.

WSL component overview

WSL is made of a set of distribution components. Some run in Windows, and some run inside the WSL 2 virtual machine. Here’s an overview of WSL’s architecture: Windows Subsystem for Linux architecture. WSL's code can be broken up into these main areas:
  • Command line executables that are the entry points to interact with WSL
    • wsl.exe, wslconfig.exe and wslg.exe
  • The WSL service that starts the WSL VM, starts distros, mounts file access shares and more
    • wslservice.exe
  • Linux init and daemon processes, binaries that run in Linux to provide WSL functionality
    • init for start up, gns for networking, localhost for port forwarding, etc.
  • File sharing Linux files to Windows with WSL's plan9 server implementation
    • plan9
Head over to https://wsl.dev to learn more about each component. This comes as an addition to the already open sourced WSL components: The following components are still part of the Windows image and are not open sourced at this time:
  • Lxcore.sys, the kernel side driver that powers WSL 1
  • P9rdr.sys and p9np.dll, which runs the “\\wsl.localhost” filesystem redirection (from Windows to Linux)

Why open source now? A bit of history…

WSL was first announced at BUILD back in 2016 and first shipped with the Windows 10 Anniversary update. At that time WSL was based on a pico process provider, lxcore.sys, which enabled Windows to natively run ELF executables, and implement Linux syscalls inside the Windows kernel. This eventually became what we today know as “WSL 1”, which WSL still supports. Over time it became clear that the best way to provide optimal compatibility with native Linux was to rely on the Linux kernel itself. WSL 2 was born, and first announced in 2019. As the community behind WSL grew, WSL gained more features such as GPU support, graphical applications support (via wslg) and support for systemd. It eventually became clear that to keep up with the growing community and feature requests, WSL had to move faster, and ship separately from Windows. That’s why in 2021 we separated WSL from the Windows codebase, and moved it to its own codebase. This new WSL first shipped as version 0.47.1 to the Microsoft Store, in July 2021. At the time, only Windows 11 was supported, and the package was marked as preview, only recommended to users that wanted to experience the latest and greatest of WSL. We continued to develop this new “WSL package” until it was ready for general availability. That happened November of 2022, with WSL 1.0.0, which added support for Windows 10 and was the first “stable” release of this new WSL. From there we kept on improving WSL, with the objective of fully transitioning all users to this new WSL package, and away from the WSL component that shipped with Windows. Windows 11 24H2 was the first Windows build that moved users from the “built-in” WSL to the “new” WSL package. We kept wsl.exe in the Windows image, so it could download the latest package on demand to make the transition easier. As we kept on improving WSL, we eventually hit another milestone: WSL 2.0.0 (What are the three hardest problems in computer science? Off by one errors and naming things!). WSL 2.0.0 introduced major improvements such as mirrored networking, DNS tunneling, session 0 support, proxy support, firewall support and more. And that’s the milestone we’re still building on today! At the time of writing this article, WSL 2.5.7 is the latest available version out of our nine pages of Github releases since 0.47.1 4 years ago !

The community behind WSL

Over the years we’ve been incredibly lucky to have a strong community supporting WSL from day 1. We’ve been blessed with people sharing their knowledge, and spending countless hours to help track down bugs, find the best ways to implement new features and improve WSL. WSL could never have been what it is today without its community. Even without access to WSL’s source code, people have been able to make major contributions that lead to what WSL is now. This is why we’re incredibly excited to open-source WSL today. 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.

Contributing to WSL

Are you interested in learning how WSL works? Would you like to see how a specific feature works, or make a change? Head over to microsoft/WSL to learn more!