WSL 3.0 has been released and comes with native support for containers and the 'wslc' CLI.

Key points:
  • Introduction of wslc and its SDK API for managing the complete lifecycle of Linux containers on Windows.
  • Session isolation using wslcsession.exe child processes and separate VHD storage per user.
  • The virtiofs default file system doubles the read and write speed between operating systems.
  • Enterprise security integration with Microsoft Intune policies and monitoring via Microsoft Defender for Endpoint.
WLS

WLS is a compatibility layer developed by Microsoft to run Linux executables natively on Windows.

Microsoft recently announced the general availability of WSL 3.0, an update that positions Windows as a comprehensive development platform for container-based and AI-powered workloads.

The main innovation in this release is the introduction of the 'wslc' (WSL Containers) command-line tool and its built-in alias 'container.exe'. This utility, along with a complementary SDK API compatible with C++ and C#/WinRT, allows developers and native Windows applications to create, run, and manage Linux containers without relying on third-party virtualization environments.

Main new features of WSL 3.0

The 'wslc' tool covers the entire container lifecycle, allowing operations such as creating, starting, stopping, exporting, and inspecting system images , as well as limiting the CPU and memory resources allocated to each instance. In the area of ​​networking, the new version enables the creation of custom virtual networks, connecting containers to multiple networks, and port forwarding . Furthermore, developers can interact with virtual hard disks (VHDs), configure default storage paths, and share Windows directories directly within mounted Linux containers.

For analysis and observability, WSL 3.0 introduces the 'wslc logs' command and real-time event monitoring , providing detailed statistics and highlighted output from container activity logs. Operating system-level integration is strengthened by allowing unprivileged users to access Graphics Processing Units (GPUs) from within the container, enabling accelerated execution of AI models and locally developed graphics tools.

Isolation and Optimized Networks

Unlike traditional virtualization architectures, WSL 3.0 deploys containers using the elevated privileges of the Windows service ' wslservice.exe '. However, to ensure isolation, this service spawns secondary processes called 'wslcsession.exe', which run under the permissions of the current system user. These sessions are strictly separate; each is assigned its own virtual hard disk (VHD), located by default in the user's directory (`%AppData%\Local\wslc\sessions`).

Network performance and compatibility have been improved, as cross-file system access now uses virtiofs technology by default , which offers read and write speeds up to twice as fast compared to traditional Windows file access.

Regarding communications, the 'consumme' network mode is introduced. This mode improves interoperability by routing Linux network traffic directly through Windows network interfaces, allowing container applications to interact seamlessly with existing virtual private networks (VPNs), enterprise proxies, and corporate security policies.

To facilitate the adoption of WSL 3.0 in production environments, Microsoft has deployed governance controls through Microsoft Intune and Microsoft Defender for Endpoint (MDE). IT administrators can now use MDE to monitor processes, networks, and files within WSL containers, correlating these activities with the host system for unified security analysis. Additionally, Intune policies allow disabling access to containers or configuring "Logging Permission Lists," forcing development teams to pull images only from verified repositories.

The ecosystem of tools compatible with wslc is rapidly expanding thanks to community contributions. The Visual Studio Code editor now supports wslc as its default driver through its "Dev Containers" extension, making it easier to compile source code remotely.

Similarly, tools like Aspire can use WSL 3.0 as their primary runtime environment. In addition to the command-line interface, developers can manage the local infrastructure using visual applications such as the terminal-based "Lazywslc," the "WinUI 3 WSL Container Desktop" desktop application, or invoke commands remotely via scripts from Linux distributions hosted on WSL. In the future, Microsoft plans to expand this ecosystem by releasing full support for wslc compose orchestration, enabling direct compatibility with existing industry-standard compose.yaml files.

Finally, if you are interested in learning more, you can find the details at the following link.


Add as preferred source in Google