Windows Subsystem for Linux (WSL) allows you to run Linux distros within the Windows operating system. WSL is available in multiple versions: WSL1 (older but still supported) and WSL2 (newer with continuous development support).
Recently, on May 19, 2025, Microsoft conducted a 2025 Build Conference where they announced the open-source nature of WSL for Windows, which is huge news for Linux users and the open-source community.
In today’s guide, I will elaborate on the recent development in the WSL project, the open-source nature of the WSL, how mature its open-source nature is, and Microsoft’s journey towards open-source. So, let’s get started:
Windows Subsystem for Linux (WSL) is now Open Source
Yes, you heard that right, Microsoft has recently declared WSL as an open-source component of Windows. Microsoft has officially released the source code of WSL on May 19, 2025, at the Microsoft Build 2025 Conference.
As per the announcement of Microsoft, the WSL is completely open-sourced except for the following three components:
- “Lxcore.sys”: Kernel-side driver that powers WSL1, i.e., component that translates Linux commands for Windows in WSL1.
- “P9rdr.sys” and “p9n9.dll”: These 9P protocol components refer to the filesystem redirection from Windows to Linux.
The above three components are tightly integrated with Windows core processes. For instance, the “Lxcore.sys” has to interact with the Windows kernel. Similarly, the 9P protocol components handle Windows files and directories. These deep integrations of WSL’s components with Windows might be the reasons behind keeping them closed-source.
This was about Microsoft’s recent announcement. Now, let me take you through Microsoft’s path towards open-source WSL.
Road to Open Source WSL
In 2019, Microsoft started maintaining its own Linux Kernel specifically for WSL, and it was declared an open-source component.
Since then, the WSL community has started growing and contributing to the WSL project. Later on, the WSLg component became open source, which provides the graphical applications support for the Linux applications in the WSL.
Microsoft gradually moved WSL to an open-source project. In 2021, Microsoft separated the Windows code base from the WSL code base. The newly released WSL was then available on the Microsoft Store for Windows 11 users. However, in 2022, it was made available for Windows 10 users too.
Apart from that, the development and upgradation of WSL keep going, i.e., the latest available WSL is “2.5.7.0”.
How can I Contribute to Open-Source WSL?
Microsoft has provided the source code Git Repo of WSL, where you can contribute to reporting the bugs/issues or developing the source code from scratch. A Linux enthusiast may love to look into the source code and contribute according to their interest.
If you are facing any technical issues relevant to WSL, you can ask for assistance on WSL’s Git repo. Similarly, if you are a regular user, you must keep on visiting the WSL repo and contribute to any other issues of the users in the comments.
Basic Understanding of the WSL Architecture
Since two different operating systems are collaborating, the component functionalities would differ in both environments. Let’s have a bird’s eye view of the WSL architecture:
Windows Host: The components hosted on the Windows side are the entry points to interact with the WSL.
- wsl.exe: Command line utility to launch or manage the WSL.
- wslconfig.exe: This mostly belongs to WSL 1 and is used to configure WSL 1.
- wslg.exe: Launch and manage the GUI apps from Windows.
- wslservice.exe: This is the background process, i.e., launch the VM, start/stop the distros attached, mount the filesystem, etc.
WSL VM Service: These components work inside the WSL VM and are triggered when the user executes Windows components.
- init: The initial process that starts in the Linux environment. It initializes the necessary processes and manages the distribution at the WSL end.
- gns (Networking): Manages DNS and network integration with Windows.
- localhost (port forwarding): The localhost running inside the Linux VM is the port forwarding.
- Plan9 Server: The server is responsible for file sharing from Windows to Linux.
Bonus: Keep Your WSL Updated
When you install WSL from the command line, it might fetch and install a bit lower version. Or even if it is up to date as per your installation, you must check for updates and get the latest available version:
Before updating:
Updating WSL:
Both the Linux Kernel and WSL versions are updated:
That’s all from this post.
Conclusion
On May 19, 2025, Microsoft announced the WSL as an open-source project. Not 100% open-source, yet a major advancement in the open-source world. Microsoft has long been working on this. Microsoft has held three components closed-source because of their deep integration with the Windows core processes.
In today’s post, I have talked about the open-source nature of WSL and Microsoft’s path to open-source WSL development.
FAQs:
Q1: Is WSL completely open source now?
Yes, except for only three components, which are “Lxcore.sys”, “P9rdr.sys”, and “p9n9.dll”.
Q2: How can I contribute to WSL?
Microsoft has provided the source code Git Repo of WSL, where you can contribute to reporting the bugs/issues or developing the source code from scratch.
Q3: Is WSL a replacement for Linux?
WSL cannot be referred to as a full replacement for Linux. WSL is just a subsystem within Windows.
Q4: Can WSL open a GUI?
Yes, WSL can open a Linux GUI application with the help of WSLg, i.e., introduced in 2021 for Windows 11 and in 2022 for Windows 10.
Source link