Microsoft has rolled out a series of enhancements for the Windows Subsystem for Linux (WSL) targeting both Windows 10 and Windows 11. These updates aim to improve various facets, including memory, storage, and networking, while also introducing a new graphical user interface (GUI) to manage WSL settings, thereby enhancing the user experience and extending WSL's capabilities.
Improved Memory, Storage and Networking
In an update released in September 2023, Microsoft introduced experimental features to better manage memory and storage in WSL. These features, which are now enabled by default, include the automated release of memory back to the Windows system and automatic disk space reclamation. The memory optimization can be controlled using the autoMemoryReclaim=dropCache setting, and disk space management can be toggled with `wsl –manage –set-sparse
WSL's networking features have also been upgraded. The subsystem now includes support for IPv6, which is activated by default on Windows 11 machines through dnsTunneling=true. Additionally, a new mirrored networking mode can be configured via `wslconfig`, offering users more networking options.
Enhanced User Customization
To make the configuration process more user-friendly, Microsoft is developing a new GUI application for WSL settings. This app will include tabs, toggles, and categories to simplify environment customization. It will be fully compatible with the existing `wslconfig` text file, ensuring that users' current configurations are preserved.
The updates make WSL more suitable for enterprise use by introducing a zero-trust security model. IT administrators can now enforce conditional access based on the state of specific Linux distributions. Integration with Entra ID is slated for July and August, which will allow users to log in with Entra ID credentials via Microsoft's Authentication Library.
Dev Home Integration and Security Features
WSL will now be included in Dev Home, enabling users to manage Linux distributions directly from the Environments tab. This feature, available through a GitHub extension from Whitewater Foundry's WSL extension Github repo, will be incorporated into a future Dev Home update. It will support the creation and management of development environments, including Hyper-V machines and dev boxes.
Microsoft Defender for Endpoint now provides comprehensive monitoring for WSL 2, and additional Intune features are being integrated to manage WSL settings and enforce conditional access based on Linux distro states. These are available for public preview.
Microsoft also announced the open-source release of Sudo for Windows and the ability to create Linux development environments using AI in Dev Home, accessible in the latest Dev Home Preview update. These tools aim to offer developers greater flexibility within WSL.