How to install WSL Containers on Windows 11

Microsoft makes WSL Containers generally available with a new wslc CLI, container API, enterprise controls, and more.

WSL Containers install / Image: Mauro Huculak
WSL Containers install / Image: Mauro Huculak
  • WSL Containers is now generally available, bringing built-in Linux container support to WSL without requiring a separate container runtime.
  • You can install WSL Containers with wsl --update, then verify the installation with wsl --version and wslc --help.
  • The final release adds new container, networking, storage, monitoring, and health-check commands, along with a WSL Containers API for Windows applications.
  • Enterprise support now includes Microsoft Intune and Defender for Endpoint, while wslc compose is planned for a future release.

On Windows 11, WSL Containers is now generally available, giving developers a built-in way to create, run, and manage Linux containers directly from the Windows Subsystem for Linux (WSL). Instead of installing a separate container runtime just to get started, the latest WSL release includes container support through a new command-line tool called wslc.

WSL Containers is no longer limited to the preview channel. The feature is available through the regular WSL update, making it easier to get started on supported Windows installations.

What is WSL Containers?

If you’ve used WSL before, you already know it lets Windows 11 (and 10) run a Linux environment without a traditional virtual machine. WSL Containers builds on that foundation by adding built-in support for running Linux containers.

A container is a lightweight, isolated environment that packages an application together with everything it needs to run. Unlike a virtual machine, it doesn’t include an entire operating system, so it starts faster and runs more efficiently. Developers commonly use containers to build and test applications that need to run consistently across different computers, servers, and cloud environments.

Until now, developers typically relied on tools such as Docker Desktop or Podman Desktop to manage Linux containers. Those applications often use WSL behind the scenes. With WSL Containers, Microsoft is adding its own built-in Linux container platform directly to WSL.

In this guide, I’ll show you how to install WSL Containers on Windows 11 and verify that the wslc command is available.

Install WSL Containers on Windows 11

To install the WSL Containers preview on Windows 11, follow these steps:

  1. Open Start on Windows 11.

  2. Search for Command Prompt (or Terminal), right-click the top result, and select Run as administrator.

  3. Type this command to install the latest pre-release of WSL and press Enter:

    wsl --update

    Install WSL Containers

  4. Type this command to restart WSL and press Enter:

    wsl --shutdown
  5. Type this command to confirm the WSL version is 3.0.1 or higher and press Enter:

    wsl --version
  6. Type this command to confirm the new container CLI is available, and press Enter:

    wslc --help

    wslc command

If the command displays the available WSL Containers options, the feature is installed and ready to use.

Get the Pureinfotech newsletter

Expert Windows guides, practical tips, and the latest updates that make your PC easier to use, delivered to your inbox

The WSL Containers CLI is provided through wslc.exe. Microsoft also includes container.exe as an alias, allowing you to use the same container commands through either command name.

After the installation, you can start using the new wslc command to create and manage Linux containers.

For example, you can use the wslc container --help command to view the available container commands.

The final release also adds commands for managing containers, networks, storage, and container activity.

Microsoft provides several examples in its documentation, including running Linux desktop environments and GPU-enabled AI workloads. The WSL Containers platform can also be used by development tools such as VS Code dev containers and Aspire, allowing developers to integrate wslc into existing workflows.

What else is included?

Installing the WSL update also brings several improvements to the underlying WSL platform. Microsoft has introduced virtiofs for containers, which the company says can deliver up to twice the Windows file access performance compared to previous implementations.

The release also includes a new experimental networking mode called consomme. Instead of using a separate networking stack, it routes Linux network traffic through Windows, allowing Linux applications to leverage the same VPN connections, proxy settings, and enterprise security policies configured on the host.

The company has also improved how WSL reclaims memory, allowing unused memory inside the Linux virtual machine to be returned to Windows more gradually after workloads finish.

What’s new in WSL Containers?

The generally available release adds several new commands and capabilities for managing containers, networking, storage, and activity. Some of the additions include:

  • wslc container restart — restart a running container.
  • wslc container cp — copy files into and out of containers using a tar archive.
  • wslc system info — view the state of the container environment.
  • wslc network connect and wslc network disconnect — attach or detach containers from networks.
  • wslc network create — supports arbitrary network driver options.
  • wslc events — stream real-time container activity.
  • Container health checks are supported.
  • The --stop-timeout option is available with wslc create and wslc run, including -1 for an infinite timeout.
  • The --mount option is supported with wslc create and wslc run.
  • The default wslc session can use a configurable storage path, allowing container storage to be placed on a different drive.

The release also adds the WSL Containers API, which Windows applications can use to run Linux containers programmatically. This opens the door to applications that can use local containerized workloads without requiring users to manage the containers manually.

Enterprise manageability

WSL Containers also adds enterprise management capabilities through Microsoft Intune and Microsoft Defender for Endpoint.

Microsoft Defender for Endpoint can surface process, file, and network activity from WSL Containers and associate that activity with the Windows host.

Microsoft Intune adds controls to enable or disable WSL Containers and restrict container image pulls to approved registries. Organizations can use the WSL Containers registry allow list to limit which container registries developers can use.

You can view the WSL enterprise documentation to learn more about setting up WSL for your organization.

Troubleshooting

If the wslc command isn’t recognized after updating:

  • Run wsl --update again and make sure the update completes successfully.
    Close and reopen Windows Terminal or Command Prompt.
  • Verify you’re running the latest WSL version by checking: wsl --version.
  • Run wslc --help again to check whether the command is available.
  • If the command is still unavailable, restart Windows and try again.
    You can also install the latest WSL release directly from Microsoft’s WSL releases page.

After completing these steps, your Windows 11 installation will be ready to create, run, and manage Linux containers using WSL Containers.

Microsoft is continuing to develop WSL Containers, with wslc compose now one of the company’s planned additions. The goal is to allow existing compose.yaml files to work with WSL Containers without modification.

Pureinfotech’s take

WSL Containers has gone from an interesting WSL experiment to a real part of the Windows developer stack.

The biggest change from the preview isn’t just that Microsoft is calling it generally available. The regular wsl --update command now puts the container runtime on the same update path as WSL itself, which makes the feature much easier to discover and deploy.

I also like the direction Microsoft is taking with wslc. The command-line interface is familiar enough for developers who already work with containers, while the new API gives Windows applications a way to use Linux containers without requiring users to manage a separate runtime.

The addition of enterprise controls is another important part of the GA release. Intune and Defender for Endpoint support means WSL Containers isn’t being treated only as a developer toy. Microsoft is giving administrators ways to control access and monitor container activity alongside the rest of the Windows environment.

There is still one obvious gap. Compose support isn’t here yet. Microsoft says wslc compose is one of its top requested features and is working toward allowing existing compose.yaml files to work unchanged.

For now, though, the bigger story is that Linux containers are becoming another workload Windows can run natively through WSL, without requiring a separate container platform just to get started.

Thank you for your feedback!
About the author

Mauro Huculak is a Windows How-To Expert and founder of Pureinfotech in 2010. With over 23 years as a technology writer and IT Specialist, Mauro specializes in Windows, software, and cross-platform systems such as Linux, Android, and macOS.

Certifications: Microsoft Certified Solutions Associate (MCSA), Cisco Certified Network Professional (CCNP), VMware Certified Professional (VCP), and CompTIA A+ and Network+.

Mauro is a recognized Microsoft MVP and has also been a long-time contributor to Windows Central.

You can follow him on YouTube, Threads, BlueSky, X (Twitter), LinkedIn and About.me. Email him at [email protected].

Comments

Join In