For this year’s Microsoft BUILD conference, we are thrilled to announce significant updates to WSL. This blog post will provide an overview of these enhancements and the recent developments in WSL.
- Memory, storage and networking improvements
- WSL Settings GUI application coming soon
- WSL Zero Trust
- Manage WSL in Dev Home, coming soon!
- Bonus improvements in Windows (Sudo for Windows, and AI powered dev container playground)
Memory, storage, and networking improvements
We announced several improvements back in September as experimental features and have since been moving these features from experimental to the default settings.
The latest pre-release version of WSL contains improvements to fundamentals of WSL, including:
- Automatically release stored memory in WSL back to Windows
- Default
autoMemoryReclaim=dropCache
- Address issues like GH#8725
- Default
- Improve networking capability
Experimental features include: – wsl --manage <distro> --set-sparse <true/false>
to enable automatic disk space reclaim. – wslconfig setting of networkingMode=mirrored
support to try the new mirrored networking mode, which adds new features like IPv6 support.
WSL Settings GUI application coming soon
To better help you customize, manage, and view the settings available in WSL, a WSL Settings GUI application is coming soon!
In the past, you would need to edit the contents of WSL’s .wslconfig
file to control WSL settings. The Linux-style .wslconfig file, text-based approach works well for specific targeted changes. However, it can be difficult to know exactly what settings and input values are available to use in this text-based approach. The WSL Settings app addresses this by breaking out WSL settings into labeled categories, and indicating which ones are available on your machine.
The best part is that the WSL Settings app is compatible with the .wslconfig
text file, meaning that your existing settings will still be respected, and you can edit settings with the GUI app, a text editor, or both as you wish!
Please stay tuned for a new WSL version with this feature.
WSL Zero trust
WSL is built on the principles of zero trust, and we’re proud to demonstrate that by announcing new features and support for enterprises using WSL.
First, Microsoft Defender for Endpoint’s WSL 2 support is now out of public preview and is generally available! You can view the plugin for WSL docs page here to learn more about using Microsoft Defender for Endpoint to monitor your WSL environment.
Secondly, further Intune features are coming to WSL with Linux Intune agent integration. As of today you can manage WSL settings via Intune, and we’re expanding this by also allowing you to enforce conditional access scenarios based on the state of the Linux distro itself. This is available today as a public preview, which first ships with the ability to determine compliance on WSL distro names and versions using custom scripting. In the future we aim to improve this by allowing you to build your own custom Linux scripts for compliance. To learn more and start using the public preview please see this doc page
Lastly , Microsoft Entra Id will also provide integration with WSL, starting with a public preview in the July and August timeframe. As a user this means that Microsoft’s Authentication Library (MSAL) will be able to communicate with WSL in a secure way, letting you automatically log in using your Entra Id credentials on Windows from experiences in WSL like git, or using Microsoft Edge. For enterprise admins this improves security by providing a secure channel to acquire and utilize tokens bound to the host device. We’ll be sure to post any news on the public preview, so stay tuned!
Manage WSL in Dev Home, coming soon!
Dev Home has a new ‘Environments’ feature, which lets you manage, launch, and create new development environments like Hyper-V machines, dev boxes and more. WSL is part of this story, as you will be able to also interact with WSL distros in this surface!
This work has been contributed by WSL community member: Carlos Ramirez from Whitewater Foundry, and we’d like to thank him for his awesome contributions! It was created following the extension interface provided by Dev Home environments. You can view the work-in-progress source code here. Whitewater Foundry has other WSL-based products and features, such as Pengwin, a WSL distro with Windows integrations, and Raft WSL, a program to manage WSL with some additional features like snapshotting your WSL distro state.
If you’d like to try this feature today, download the initial build of the WSL Dev Home extension from Whitewater Foundry’s WSL extension Github repo and install the MSIX. We are working on integrating this extension into Dev Home… stay tuned!
Bonus improvements
For us Linux on Windows fans, there are also other areas of the OS that are getting new and interesting improvements that are available now:
- Sudo for Windows was announced a few months ago. Just as the name says, you can enable this feature to use the
sudo
command in Windows and elevate specific commands. - Create new Linux development environments, using AI, with Dev Home’s quickstart playground feature. This new experimental feature allows you to enter a prompt like: ‘Create a project to make the game Snake in Python’, hit Generate, and have a full Linux dev container environment built for you using the power of AI. Here’s a demo of it in action.
Thanks and feedback
We are hugely thankful to our awesome community for supporting WSL and its related efforts. For technical issues on WSL, please file them at the WSL GitHub repo, and for general questions please don’t be afraid to reach out on X at craigaloewen. For more BUILD announcements check out this blog post. Thank you and happy coding!
I am obviously not smart enough to understand sudo for Windows.
I am trying sudo and all I am getting is a program launched with exactly the same group memberships and privileges I already have. I am also unable to find any way to configure which programs should be startable by sudo.
I noticed that when UAC is enabled and I am in the Administrators group and running a non-elevated shell, sudo appears to be doing the...
Why would there be specific commands, sudo is just “run the rest of the command line as administrator” isn’t it?
What about WSA (Windows Subsystem for Android)?
https://github.com/microsoft/WSA/discussions/536 it’s going out of support
Why not integrate the WSL settings app into Dev Home anyway? Making it a different application is ok I guess, but if you put the settings and the instance management in the same place, it would make a whole lot more sense imo.
The latest pre-release version of WSL contains improvements to fundamentals of WSL
So, are these expected to be released with the next Windows update, or will they be released with a WSL update?
All of these changes are out of the Windows image, so will be part of regular app updates. You can see the latest WSL updates here: https://github.com/microsoft/WSL/releases