WSL Gets Its Own Linux Container Runtime with Docker-Like Commands

Microsoft’s new WSL Containers feature brings a familiar Docker-like CLI and a native Windows API for running Linux containers through WSL.

Microsoft is adding a new WSL Containers feature to Windows Subsystem for Linux, giving Windows users a built-in way to create, run, and manage Linux containers through WSL using a Docker-like command-line interface.

The feature, now available in public preview through the latest pre-release version of WSL, introduces a new wslc.exe binary that Microsoft says is designed to provide a familiar CLI experience for Linux container workflows. Users can try it by updating WSL with the wsl --update --pre-release command.

While some earlier speculation suggested this might be related to a future “WSL 3,” Microsoft is not presenting it as a new major version of WSL. Instead, WSL Containers is a separate WSL feature that adds container support through two main components: a command-line tool and a developer API.

The CLI side is where the Docker comparison becomes hard to miss, putting WSL Containers very close to Docker territory, at least conceptually. Microsoft’s examples include commands such as:

wslc run --rm -it ubuntu:latest bash -c "echo Hello world from WSL container!"
wslc image ls
wslc run -it --rm -d -p 8080:80 --name web nginx
wslc container ps
wslc container stop webCode language: CSS (css)

As you can see, the workflow looks very familiar to one used with Docker. You can run containers, list images, expose ports, start web servers, check running containers, and stop them, all from Windows using WSL’s container tooling.

Microsoft also says the tool includes a built-in container.exe alias that runs wslc.exe, allowing users to call either wslc or container depending on preference.

But the more interesting part may be the API. Microsoft is also shipping a Microsoft.WSL.Containers NuGet package that lets Windows applications programmatically use Linux containers as part of their own app logic. The API supports C, C++, and C#, and allows apps to pull images, start containers, interact with processes, stream input and output, configure mounts, use networking, and access GPUs.

According to Microsoft, this opens the door for native Windows apps to reuse Linux-specific code, run local AI workloads, test containerized pipelines, or isolate Linux processes while still integrating with the Windows host.

Microsoft also frames the feature as enterprise-ready. The company says WSL Containers will support policy-based management, including controls over whether WSL distros or containers can be used in an organization and which container registries are allowed for pulling images. Plus, Microsoft Defender for Endpoint integration is also being updated to monitor Linux container events, though that part is currently in private preview.

There are also lower-level WSL improvements tied to the new container feature. Microsoft says WSL Containers uses virtiofs as its new default file system, which should make Windows file access faster, and a new experimental networking mode called consomme, designed to improve compatibility with Windows networking environments, VPNs, proxies, and enterprise security policies.

For now, WSL Containers remains a public preview feature available only through the pre-release WSL channel. Microsoft says it aims to make the feature generally available in the fall of 2026.

For additional details, see Microsoft’s WSL containers docs.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

Your email address will not be published. Required fields are marked *