WSL Containers: Running Linux Container Workloads Directly on Windows
Quick Answer WSL containers are a built-in capability of the Windows Subsystem for Linux (WSL) that enables developers, IT professionals and Windows applicat...
Quick Answer
WSL containers are a built-in capability of the Windows Subsystem for Linux (WSL) that enables developers, IT professionals and Windows applications to build, run and manage Linux containers directly from Windows without installing a separate third-party container engine.
Originally introduced at Microsoft Build 2026 and subsequently released in public preview, WSL containers are now generally available. The feature introduces a dedicated command-line interface called wslc.exe and a container API that allows Windows applications to interact programmatically with Linux container workloads.
WSL containers require WSL version 2.9.3 or later. They provide familiar container commands, image management, application isolation, GPU acceleration, resource configuration and integration with Microsoft enterprise management and security tools.
Although containers can be managed directly from Windows, Linux workloads still execute within a WSL-backed Linux environment. This does not mean that Linux applications execute directly against the Windows kernel.
What Are WSL Containers?
WSL containers extend the Windows Subsystem for Linux by providing an integrated platform for running containerized Linux applications on Windows computers.
A container is an isolated application environment that packages software together with its required libraries, dependencies, configuration and runtime components. Containers help developers maintain consistent application environments across development, testing and deployment systems.
Before Microsoft introduced built-in WSL container support, developers commonly used Docker Desktop, Podman Desktop, Rancher Desktop or container engines installed inside WSL Linux distributions.
These solutions remain available. However, WSL containers introduce another option in which core Linux container operations are provided as part of WSL itself.
The two principal components of this capability are:
- WSL container CLI: A command-line utility for managing container images, containers, application builds and related operations.
- WSL container API: A programming interface that enables Windows applications to incorporate Linux container workloads into their application logic.
What Is New About WSL Containers?
Running Linux containers on Windows is not a new concept. Developers have been able to use container platforms with WSL 2 for several years.
The significant change is that Microsoft now provides container management functionality as an integrated WSL capability rather than requiring developers to install and maintain a separate container engine for supported workflows.
The generally available release includes capabilities such as:
- Building and running Linux container images.
- Pulling images from container registries.
- Starting, stopping and restarting containers.
- Executing additional commands inside running containers.
- Copying files between containers and external environments.
- Publishing container network ports.
- Attaching and detaching container networks.
- Container health checks.
- Configurable container stop timeouts.
- Container event monitoring.
- Configurable CPU, memory and storage settings.
- Programmatic container management from Windows applications.
- Enterprise security and administrative policy integration.
Microsoft continues to develop additional functionality. In particular, support for existing Compose-based multi-container workflows remains an area of ongoing development.
How Do WSL Containers Work?
Windows and Linux use different operating system kernels. Linux container applications commonly depend on Linux-specific kernel functionality that is not provided directly by the Windows kernel.
WSL addresses this requirement by providing a virtualized Linux execution environment.
WSL containers use that underlying infrastructure to execute Linux container workloads while exposing management functionality to Windows users and applications.
WSL Container Architecture
| Component | Purpose |
|---|---|
| Windows host | Provides the primary operating system, desktop environment, hardware access and administrative controls. |
| WSL container CLI | Accepts container management commands from PowerShell, Command Prompt and supported development tools. |
| WSL container API | Allows Windows applications to request and manage Linux container operations programmatically. |
| WSL-backed container session | Provides the Linux environment in which container workloads execute. |
| Linux kernel | Provides operating system functionality required by Linux processes and containers. |
| Container image | Contains the application, dependencies and filesystem content required to create a container. |
| Running container | Executes the application within its configured Linux container environment. |
This architecture allows developers to work with Windows applications and Linux container workloads on the same computer without manually creating and administering a conventional Linux virtual machine.
Container Images and Running Containers
A container image is a packaged template containing the files and components required by an application. A container is an instance created from that image.
For example, an Nginx container image contains the components required to run the Nginx web server. Multiple containers can be created from the same image, subject to available resources and configuration.
Understanding this distinction is important because deleting a container and deleting its underlying image are different operations.
System Requirements and Compatibility
| Requirement | Details |
|---|---|
| WSL version | WSL 2.9.3 or later. |
| Operating system | A supported Windows installation capable of running the required WSL release. |
| Virtualization | Hardware virtualization and the Windows virtualization components required by WSL. |
| Processor | A processor architecture supported by the installed WSL release and the selected container image. |
| Memory | Sufficient RAM for Windows, the WSL environment and the intended container workloads. |
| Storage | Sufficient free space for container images, writable container data and application files. |
| Network connectivity | Access to the required container registries when downloading images. |
| GPU acceleration | Compatible GPU hardware, drivers and container software when accelerated workloads are required. |
| Development tools | Visual Studio Code, Windows Terminal and other development tools are optional. |
Compatibility note: General WSL operating system requirements should not automatically be interpreted as confirmation that every WSL container feature is supported on every Windows edition, Windows Server release or processor architecture. Verify the latest Microsoft documentation before deploying WSL containers across an organization.
Microsoft does not specify a single universal memory or disk space requirement suitable for all container workloads. Resource requirements depend on the applications being executed.
How to Install and Enable WSL Containers on Windows
The following procedure applies to computers that support current WSL releases. Installing Windows optional components may require administrator privileges and a system restart.
On organization-managed computers, obtain approval from the IT administrator before installing or updating WSL. Existing policies may restrict container functionality or access to external registries.
Step 1: Install Windows Subsystem for Linux
If WSL is not already installed, open Windows PowerShell or Windows Terminal as an administrator and run:
wsl --install
This command installs the necessary WSL components and normally installs the default Linux distribution.
Restart Windows if prompted.
If WSL is already installed, proceed to the next step.
Step 2: Update WSL
Open PowerShell and execute:
wsl --update
This requests the latest available WSL update through the normal release channel.
Because WSL containers are generally available, installing a pre-release version is not normally required solely to obtain the container functionality.
Step 3: Verify the Installed WSL Version
wsl --version
Confirm that the installed WSL version is 2.9.3 or later.
The displayed WSL version refers to the installed WSL software release. It should not be confused with the WSL 1 and WSL 2 architecture designations used for Linux distributions.
Step 4: Verify the WSL Container CLI
Run the following command from PowerShell:
wslc version
If the command returns version information, the WSL container CLI is available.
You can also inspect the available commands by running:
wslc --help
Use the help output from the installed version when checking supported options and command syntax.
How to Run Your First Linux Container Using WSL
A simple Ubuntu container provides a useful way to verify that the container platform is functioning.
Run the following command from PowerShell:
wslc run --rm ubuntu:latest echo "Hello from WSL containers"
If the required image is not already available locally, the container engine will attempt to retrieve it from the relevant registry.
After the image becomes available, the container executes the specified command and displays:
Hello from WSL containers
The command options have the following meanings:
runcreates and starts a container.--rmautomatically removes the container after it exits.ubuntu:latestidentifies the container image and tag.echoexecutes a simple command inside the Linux container.
Image versioning note: The latest tag is convenient for demonstrations but does not guarantee a fixed image version. For repeatable business and development workloads, use an approved version-specific tag or immutable image digest.
How to Open an Interactive Linux Container
To open a temporary interactive Ubuntu environment, run:
wslc run --rm -it ubuntu:latest bash
The container starts a Bash shell that accepts Linux commands.
For example, you can display operating system information by running:
cat /etc/os-release
When finished, enter:
exit
Because the container was created with --rm, it is automatically removed when the shell exits.
Files stored only within the writable layer of this temporary container should not be treated as permanent application data.
How to Run a Web Server Using WSL Containers
WSL containers can run local web servers that are accessible from Windows development tools and web browsers.
The following example demonstrates how to run an Nginx web server for local testing.
Step 1: Start the Web Server Container
wslc run -d --rm -p 8080:80 --name web nginx
The command starts Nginx in the background and publishes its HTTP service through port 8080.
The relevant options are:
-druns the container in the background.--rmremoves the container automatically when it stops.-p 8080:80maps host port 8080 to container port 80.--name webassigns a recognizable name to the container.nginxidentifies the container image.
Network security note: Before publishing container ports on a shared or business network, verify the configured binding address and applicable firewall policies. Do not assume that a published port is accessible only from the local computer.
Step 2: Open the Web Server
Open the following address in a Windows web browser:
Alternatively, test the server from PowerShell:
curl.exe http://localhost:8080
If the container and networking are functioning correctly, the default Nginx welcome page or its HTML content should appear.
Step 3: Verify the Running Container
wslc container ps
The running container named web should appear in the output.
Step 4: Stop the Web Server
wslc container stop web
The web server stops, and the temporary container is removed because it was originally started with the --rm option.
The downloaded Nginx image may remain available locally for future use.
Common WSL Container Commands
The following commands cover several frequently used WSL container operations.
| Command | Purpose |
|---|---|
wsl --version |
Displays the installed WSL release information. |
wsl --update |
Updates WSL through the normal release channel. |
wslc version |
Displays WSL container CLI version information. |
wslc --help |
Displays available container commands and options. |
wslc image ls |
Lists locally available container images. |
wslc container ps |
Lists running containers. |
wslc run --rm -it ubuntu:latest bash |
Starts a temporary interactive Ubuntu container. |
wslc exec web cat /etc/os-release |
Executes a command inside the running container named web. |
wslc container stop web |
Stops the container named web. |
wslc settings |
Creates or opens the WSL container settings file. |
wslc settings reset |
Resets the container settings file to its documented defaults. |
Although many WSL container commands resemble Docker commands, not every Docker command, option or extension is necessarily supported. Check the installed CLI help before adapting existing scripts.
Building Custom Container Images
WSL containers support application development workflows in which developers build their own container images rather than relying entirely on prebuilt images.
A typical development workflow involves:
- Creating or obtaining the application source code.
- Selecting an appropriate Linux base image.
- Defining the application dependencies and build instructions in a Dockerfile.
- Building the application container image.
- Running the resulting image locally.
- Testing the application and verifying its behavior.
- Publishing the approved image to a permitted container registry when required.
For example, a developer working on a Python web application can define its Python runtime and dependencies in a container image. Another developer can then use that image without manually reproducing the complete Python environment on Windows.
This approach helps reduce dependency conflicts between projects and improves environment consistency.
However, containerization alone does not guarantee identical application behavior across all systems. Processor architecture, environment variables, storage, networking and external services can still affect the application.
WSL Container Integration with Visual Studio Code
Visual Studio Code supports container-based development environments through its Dev Containers extension. Microsoft has introduced support for using WSL containers as the underlying container platform.
This allows supported projects to use development environments that contain project-specific compilers, language runtimes, libraries and tools.
Configuring Visual Studio Code to Use WSL Containers
- Install or update Visual Studio Code.
- Install the Dev Containers extension.
- Verify that the installed extension version supports WSL containers.
- Open Visual Studio Code Settings.
- Search for the Dev Containers Docker Path setting.
- Set the container executable path to
wslc. - Open a compatible development container project and test its startup.
If an existing development container configuration depends on unsupported Docker features, additional changes may be required.
To return to a previous container engine, restore the original Docker Path setting and reopen the development environment.
WSL Container API for Windows Application Developers
One of the more significant additions is the WSL container API, which enables Windows applications to incorporate Linux container operations into their own application workflows.
Instead of requiring users to manually open a Linux terminal or start a separate container management application, developers can integrate container lifecycle operations into their Windows software.
For example, a Windows desktop application could use a Linux container to execute a specialized document processing component, a Python-based data analysis service or an existing Linux application dependency.
Supported Programming Interfaces
Microsoft provides container programming interfaces for C, C++ and C# development.
The API is distributed through the following NuGet package:
Microsoft.WSL.Containers
For a compatible .NET project, the package can be added using:
dotnet add package Microsoft.WSL.Containers
A C# application can import the corresponding namespace as follows:
using Microsoft.WSL.Containers;
Installing the NuGet package does not by itself configure all operating system prerequisites. Applications must also verify that the required WSL components are installed and available.
Principal API Objects
| Object | Responsibility |
|---|---|
WslcService |
Checks platform dependencies and provides service-level information and operations. |
Session |
Represents the container hosting environment and manages image-related operations. |
Container |
Provides lifecycle and execution operations for an individual container. |
Process |
Provides interaction with an executing Linux process, including its input, output and completion behavior. |
Typical Windows Application Integration Workflow
- Check whether the required WSL components are available.
- Establish a container session.
- Retrieve or select the required container image.
- Configure application resources, storage and networking.
- Create and start the container.
- Exchange information with the Linux process.
- Monitor execution results and handle errors.
- Stop or release resources when they are no longer required.
The API also integrates with development build systems such as MSBuild and CMake, allowing supported container-related operations to become part of application build and deployment workflows.
API compatibility note: Microsoft identifies the C++/WinRT projection as a preview capability that may undergo breaking changes. General availability of the container platform should not be interpreted as confirmation that every programming interface has reached the same maturity level.
Performance and Infrastructure Improvements
WSL containers introduce improvements to several underlying platform components, including filesystem access, networking and memory management.
Virtiofs Filesystem Integration
WSL containers use Virtiofs to improve access to Windows-hosted files from the Linux environment.
Virtiofs is a filesystem-sharing technology designed to provide efficient access to files between virtualized environments and their hosts.
This can benefit workloads that frequently interact with Windows project directories, source code, build inputs and generated files.
Microsoft has reported approximately twice the Windows file-access performance in its measurements. Actual results depend on the workload, hardware, storage system and access patterns.
This improvement should not be interpreted as a guarantee that every containerized application will run twice as fast.
Consomme Networking
WSL containers introduce a networking mode called Consomme, which routes Linux network activity through Windows.
The objective is to improve compatibility with Windows networking environments, particularly those involving enterprise network configurations, security controls, VPN connections and proxies.
Organizations should nevertheless test container connectivity in their own environments. Compatibility with every VPN client, proxy configuration or endpoint security product cannot be assumed.
Improved Memory Reclamation
Container development workloads can consume substantial memory during compilation, application execution and testing.
Improvements to the underlying WSL memory-management infrastructure help unused memory become available to the Windows host more consistently.
This can be useful on development workstations running multiple applications simultaneously, including web browsers, development environments, databases and container workloads.
Memory reclamation does not eliminate the need to provision sufficient RAM for the intended applications.
GPU-Accelerated Linux Workloads
WSL containers support GPU access for compatible accelerated workloads.
Potential applications include machine learning, artificial intelligence development, scientific computation and other software that uses supported GPU computing frameworks.
Successful GPU acceleration depends on the installed hardware, Windows drivers, WSL support, container image architecture and application framework.
Developers should validate the complete GPU software stack instead of assuming that every Linux GPU application will operate without modification.
Configuring WSL Container Resources
WSL containers provide a dedicated per-user settings file for configuring container session resources and related behavior.
The settings file is located at:
%LOCALAPPDATA%\wslc\settings.yaml
The file may not exist until it is created through the container settings command.
Opening the Settings File
Run the following command from PowerShell:
wslc settings
This creates or opens the settings file using the configured editor.
The following is an illustrative configuration for a development workstation:
session:
cpuCount: 4
memorySize: 8GB
defaultBindingAddress: 127.0.0.1
These values are examples rather than universal recommendations. Select resource limits according to the available hardware and expected workloads.
Available Configuration Areas
| Setting | Purpose |
|---|---|
cpuCount |
Configures the CPU resources available to the container session. |
memorySize |
Configures the memory available to the session. |
maxStorageSize |
Configures the maximum storage size. |
storagePath |
Specifies the configured container storage location. |
defaultBindingAddress |
Configures the default address used for port bindings. |
hostLoopback |
Configures the hostname used for host loopback access. |
idleTimeout |
Controls the configured session idle timeout. |
Consult the current WSL container settings documentation for accepted values, units, defaults and the conditions under which changes take effect.
Some changes may require the container session to restart. Avoid modifying resource or storage settings while important workloads are running without first checking the expected consequences.
Restoring Default Settings
Before resetting the settings, save a copy of the existing YAML file if it contains important customizations.
To reset the configuration file, run:
wslc settings reset
This overwrites the settings file with the default configuration template. Any required custom values must be reapplied afterward.
Enterprise Management and Security Capabilities
Enterprise adoption of Linux containers on Windows requires more than the ability to execute applications. Organizations also need administrative controls, security visibility, approved software sources and predictable operational behavior.
Microsoft has extended WSL management and security capabilities to include its container platform.
Microsoft Intune Integration
Administrators can use supported WSL management policies to control container functionality across managed Windows devices.
Relevant policy capabilities include:
- Allowing or blocking the use of WSL containers.
- Controlling privileged container operations.
- Restricting container access to approved image registries.
- Managing selected WSL virtualization and networking settings.
- Applying organizational restrictions to applications that depend on the container API.
Disabling WSL container functionality may also prevent Windows applications that depend on the WSL container API from operating correctly.
Administrators should identify application dependencies before applying restrictive policies across production devices.
Group Policy Management
Applicable WSL administrative policies are also available through Microsoft-provided ADMX administrative templates.
This gives organizations another management option for environments that use Windows Group Policy rather than relying exclusively on cloud-based endpoint management.
Administrators should obtain current administrative templates from the official WSL repository or Microsoft documentation rather than creating undocumented registry-based substitutes.
Container Registry Allowlists
A container registry is a service used to store and distribute container images.
Public registries can contain useful software, but organizations may need to restrict the locations from which employees obtain container images.
WSL container registry allowlist policies enable administrators to limit image pulls to approved registries. The policy applies to relevant operations performed through both the container CLI and the container API.
For example, an organization can maintain an internal registry containing reviewed and approved application images.
Registry restrictions should be combined with image scanning, version control, image provenance verification and appropriate access management. An approved registry alone does not guarantee that every image stored in it is secure.
Microsoft Defender for Endpoint Integration
Microsoft has extended the WSL integration of Microsoft Defender for Endpoint to include visibility into container activity.
This helps security teams monitor relevant Linux workload events alongside their existing Windows endpoint security information.
Organizations must verify that their Defender deployment, licensing, installed components and configuration satisfy the current requirements for container monitoring.
The availability of WSL containers does not automatically confirm that security monitoring is configured or operational on a particular device.
WSL Containers vs Traditional WSL Linux Distributions
WSL containers and conventional WSL distributions serve related but different purposes.
| Feature | Traditional WSL Distribution | WSL Containers |
|---|---|---|
| Primary purpose | General-purpose Linux development and command-line environment. | Containerized application execution and development. |
| Management interface | wsl.exe and Linux utilities. |
wslc.exe and the container API. |
| Environment lifecycle | Typically maintained as a persistent Linux installation. | Created and managed according to individual container lifecycles. |
| Software dependencies | Commonly installed and maintained inside the distribution. | Commonly packaged within application images. |
| Application portability | Depends on distribution configuration and installed software. | Image-based packaging improves consistency across compatible environments. |
| Isolation | Distribution-level environment separation. | Container-level separation within the underlying Linux environment. |
| Typical use case | Linux shells, command-line utilities and general development. | Application services, isolated dependencies and reproducible development workloads. |
Developers do not necessarily need to choose one platform exclusively. A conventional WSL distribution can provide a general-purpose development environment while WSL containers provide isolated application runtimes.
WSL Containers vs Docker Desktop
Docker Desktop remains an established container development platform. WSL containers provide an integrated alternative for supported Linux container workflows on Windows.
| Feature | WSL Containers | Docker Desktop |
|---|---|---|
| Provider | Microsoft. | Docker. |
| Installation | Included with compatible WSL releases. | Separate application installation. |
| Primary CLI | wslc |
docker |
| Management experience | Built-in CLI and Windows application API. | CLI and integrated desktop management interface. |
| Linux containers | Supported. | Supported. |
| Container Compose workflows | Support for existing Compose workflows is an ongoing development area. | Established Docker Compose integration. |
| Enterprise administration | Integration with supported Microsoft WSL management and security policies. | Docker administrative and enterprise management capabilities, depending on configuration and subscription. |
| Windows application integration | Dedicated WSL container API. | Docker APIs and supported client integrations. |
| Best suited for | Integrated Windows and Linux container workflows that fit the supported WSL feature set. | Established Docker-based development environments and broader Docker ecosystem workflows. |
Can WSL Containers Replace Docker Desktop?
WSL containers may replace Docker Desktop for users whose workloads require only the functionality currently provided by the WSL platform.
However, organizations should not assume that WSL containers are a complete replacement for every Docker-based workflow.
Existing projects may depend on Docker Compose, Docker-specific APIs, desktop extensions, build integrations, orchestration tools or other ecosystem features.
Before replacing an established container platform, inventory the required capabilities and validate them against the current WSL container release.
Licensing should also be evaluated separately. The integration of WSL containers into Windows does not eliminate applicable Windows licensing, enterprise security subscriptions or the licensing obligations of individual container images and applications.
Practical Use Cases for Developers and Enterprises
Web Application Development
Developers can run Linux-based web application components on their Windows computers without manually maintaining a separate Linux server.
Examples include development environments for Python, PHP, Node.js, Java and other supported application runtimes.
Windows Desktop Application Development
Windows desktop applications can use the container API to incorporate Linux-based application components where appropriate.
For example, a Windows application developed using .NET could delegate a specialized background task to a Linux container and retrieve the processing result.
This can reduce the need to rewrite an existing Linux-dependent component specifically for Windows.
Database Development and Testing
Containerized database environments can help developers test applications against different database versions without installing every database engine directly into Windows.
Potential examples include PostgreSQL, MariaDB and other databases with compatible Linux container images.
Database workloads require careful storage configuration. Important database files must be stored in suitable persistent storage and protected by appropriate backup procedures.
Software Testing and Quality Assurance
Quality assurance teams can create controlled container environments for testing software dependencies, application updates and Linux-specific behavior.
Temporary environments can also help reduce interference between independent testing activities.
Production acceptance testing should still include the actual target deployment environment.
Artificial Intelligence and Data Processing
Compatible Linux container images can provide environments for Python-based data processing, machine learning libraries and GPU-accelerated software.
Developers can use Windows productivity applications alongside their Linux-based computational workloads.
Enterprise Development Environment Standardization
Organizations can maintain approved container images containing standard tools, libraries and development dependencies.
Teams can use these images to create consistent development environments while administrators apply relevant endpoint and registry policies.
This approach can simplify onboarding and reduce configuration differences between development workstations.
Modernization of Existing Linux Applications
Organizations that maintain both Windows and Linux software can evaluate WSL containers as a way to integrate selected Linux components into Windows-based workflows.
Migration suitability depends on the application's hardware requirements, networking, storage behavior, security requirements and operational support model.
Advantages of WSL Containers
- Integrated container functionality: Supported workloads do not require a separately installed third-party container engine.
- Familiar command-line experience: Developers with existing container knowledge can adapt to many of the available commands.
- Windows application integration: Native Windows software can incorporate Linux container operations through the dedicated API.
- Environment consistency: Application dependencies can be packaged into reusable container images.
- Improved filesystem integration: Virtiofs can benefit workloads involving Windows-hosted files.
- Networking improvements: The platform is designed to integrate more closely with Windows networking environments.
- GPU support: Compatible accelerated Linux workloads can execute within containers.
- Enterprise governance: Appropriate Microsoft administrative and security tools can help organizations manage container usage.
- Flexible resource configuration: Container session resources can be adjusted according to workload requirements.
Limitations and Important Considerations
Linux Containers Are Not Windows Containers
WSL containers are designed for Linux container workloads.
Applications that require Windows-specific container images, Windows kernel functionality or Windows container hosting capabilities require an appropriate Windows container platform.
Docker Compatibility Is Not Complete
Familiar command syntax does not imply complete Docker API, CLI or ecosystem compatibility.
Existing scripts, integrations and development tools must be tested before migration.
Multi-Container Orchestration
Applications consisting of multiple interconnected services commonly use Docker Compose or other orchestration platforms.
Microsoft identifies support for existing Compose configurations as an ongoing development priority. Projects that depend heavily on Compose should verify current capabilities before adopting WSL containers as their primary platform.
Persistent Storage Requires Planning
Container writable layers are not a suitable replacement for properly managed persistent application storage.
Removing or recreating containers can result in the loss of files stored exclusively inside their writable layers.
Persistent data, including databases and business-critical application files, requires appropriate storage configuration, backup and recovery procedures.
Resource Consumption
Container images, build caches and application data consume disk space. Running workloads also consume memory and processor resources.
Administrators should monitor resource consumption rather than assuming that containers have negligible overhead.
Production Deployment Requirements
General availability indicates that the feature has been released beyond its initial preview stage. It does not automatically establish suitability for every production deployment scenario.
Organizations considering production use should verify support conditions, application dependencies, availability requirements, service recovery, monitoring, backup procedures and security controls.
WSL containers should not automatically be treated as a replacement for dedicated Linux servers, managed container hosting services or Kubernetes infrastructure.
Common WSL Container Problems and Troubleshooting
The wslc Command Is Not Recognized
This can occur when the installed WSL release does not include the container CLI or when Windows cannot locate the executable.
First, check the installed version:
wsl --version
If necessary, update WSL:
wsl --update
Close and reopen the terminal and check whether Windows can locate the command:
Get-Command wslc.exe
Finally, verify the CLI:
wslc version
If the command remains unavailable despite having a compatible release, investigate installation integrity, executable discovery and organization-managed restrictions.
Do not immediately unregister existing WSL distributions or reinstall Windows, as these actions may be unnecessary and could disrupt existing development environments.
Container Images Cannot Be Downloaded
Possible causes include:
- Unavailable internet connectivity.
- DNS resolution problems.
- Proxy or VPN restrictions.
- Container registry authentication requirements.
- Registry service availability problems.
- Organization-managed registry restrictions.
- An incorrect image name or tag.
Review the actual error message, verify the image reference and confirm that the registry is permitted by organizational policy.
Do not disable endpoint protection or bypass enterprise registry policies to resolve an image download failure.
A Containerized Web Application Is Not Accessible
First, confirm that the container is running:
wslc container ps
Check that the application is listening on the intended container port and that the host-to-container port mapping is correct.
For the Nginx example using port 8080, test local TCP connectivity from PowerShell:
Test-NetConnection localhost -Port 8080
If the connection fails, inspect application startup, port conflicts, binding configuration and applicable network security settings.
Use another unused and approved port when a confirmed port conflict prevents the application from starting.
Containers Consume Excessive Memory
Open Windows Task Manager and review overall system memory consumption.
Identify whether the container workload, Windows applications or another WSL environment is responsible for the increased usage.
If appropriate, review the container resource configuration:
wslc settings
Adjust memory resources according to the needs of the workload and available hardware. Excessively restrictive memory limits can cause application failures rather than improve performance.
A Container Exits Immediately After Starting
A container normally stops when its primary process completes or terminates.
An immediate exit can therefore be expected behavior for a short command. It may also indicate an application startup failure, missing dependency or incorrect configuration.
Review the application output and expected lifecycle before treating the exit as a platform error.
For interactive troubleshooting, avoid automatic container removal when retaining diagnostic state is necessary.
Existing Docker Scripts Do Not Work with wslc
The command syntax or feature required by the script may not be available in the installed WSL container release.
Review the supported commands:
wslc --help
Identify the unsupported operation and determine whether a documented alternative exists.
If the workflow depends on unavailable functionality, continue using the existing compatible container platform until the required capability is supported.
Security Best Practices for WSL Containers
Container security depends on the image, application, underlying operating system, host configuration and administrative controls.
Containers provide useful application separation, but they should not be treated as an unconditional security boundary for arbitrary or untrusted software.
- Use trusted images: Obtain container images from verified publishers and approved registries.
- Maintain current software: Update Windows, WSL, container images and application dependencies through approved maintenance procedures.
- Use version-specific images: Select tested image versions or immutable digests for repeatable deployments.
- Scan images: Use suitable vulnerability scanning and software supply chain verification processes.
- Apply least privilege: Avoid unnecessary elevated permissions and privileged container execution.
- Restrict network exposure: Publish only the ports required by the application.
- Protect host files: Grant containers access only to the directories and files they require.
- Protect credentials: Do not embed passwords, API keys or access tokens in container images or source-controlled build files.
- Monitor workload activity: Configure supported endpoint security and application monitoring tools.
- Maintain backups: Protect persistent application data and important configuration files.
- Enforce enterprise policies: Apply approved registry restrictions and administrative controls where appropriate.
Recommended Enterprise Adoption Strategy
Organizations already using Docker Desktop or another container platform should evaluate WSL containers through a controlled adoption process rather than performing an immediate organization-wide migration.
- Identify requirements: Document the applications, container commands, registries, development tools and orchestration features currently in use.
- Verify compatibility: Confirm that target Windows devices and WSL versions support the required container capabilities.
- Establish security controls: Configure permitted registries, access restrictions, monitoring and image review procedures.
- Create a pilot environment: Begin with non-critical development workstations and representative application workloads.
- Validate application behavior: Compare functionality, performance, resource consumption, storage and networking with the existing platform.
- Test operational procedures: Verify software updates, application recovery, data protection and troubleshooting processes.
- Evaluate feature gaps: Identify any Docker, Compose or third-party integrations that must remain available.
- Expand gradually: Increase deployment only after compatibility, security and support requirements have been satisfied.
Maintain the existing container platform during the pilot where practical. This provides a fallback if important workloads depend on features that WSL containers do not yet support.
Frequently Asked Questions
Are WSL containers generally available?
Yes. Microsoft's current developer documentation identifies WSL containers as generally available. The feature was initially introduced at Microsoft Build 2026 and entered public preview on June 29, 2026.
Some supplementary features and programming interfaces may still have separate preview or availability conditions.
What is the minimum WSL version required?
Microsoft documents WSL version 2.9.3 as the minimum version required for WSL container functionality.
For current fixes and generally available improvements, use the latest appropriate stable WSL release.
Do WSL containers require Docker Desktop?
No. WSL provides its own container CLI for supported Linux container operations. Docker Desktop may still be necessary for workflows that depend on Docker-specific functionality.
Can WSL containers be managed from PowerShell?
Yes. The wslc.exe utility can be used from PowerShell, allowing container management directly from the Windows command-line environment.
What is the difference between wsl.exe and wslc.exe?
wsl.exe manages general WSL functionality and Linux distributions, while wslc.exe manages Linux container workloads and related container operations.
Can WSL containers run Windows container images?
No. The WSL container feature is intended for Linux container workloads. Windows container images require a compatible Windows container environment.
Can a C# Windows application execute Linux containers?
Yes. Compatible C# applications can use the Microsoft.WSL.Containers NuGet package to integrate supported container operations into their application workflows.
Does WSL container support Docker Compose?
Complete compatibility with existing Docker Compose workflows should not be assumed. Microsoft identifies this functionality as an ongoing development area.
Can WSL containers and Docker Desktop coexist?
They can be evaluated as separate container platforms on compatible Windows computers. Their resource usage, networking configuration, image storage and port assignments must be managed appropriately.
Do not assume that container images or running containers created by one engine will automatically appear in the other.
Can enterprise administrators restrict WSL container usage?
Yes. Microsoft provides relevant administrative policies for container access, privileged operations and approved container registries through supported management mechanisms.
Can existing Dockerfiles be used with WSL containers?
Compatible Dockerfiles can be used for supported image build workflows. Existing build instructions that depend on engine-specific extensions or unsupported features may require changes.
Do WSL containers eliminate the need for virtualization?
No. Linux container workloads still depend on the underlying Linux execution environment provided through WSL virtualization technology.
Are WSL containers a replacement for Kubernetes?
No. WSL containers provide local container execution and management capabilities. Kubernetes provides distributed container orchestration functionality, including workload scheduling and cluster management.
Are WSL containers suitable for business-critical production applications?
Suitability depends on the specific application, Windows platform, Microsoft support conditions, security requirements and operational architecture.
Organizations should validate these requirements before adopting WSL containers for business-critical production workloads.
Key Takeaways
WSL containers represent an important expansion of the Windows Subsystem for Linux by introducing integrated Linux container management and a dedicated Windows application programming interface.
Developers can use the wslc.exe command-line utility to perform supported container operations without installing a separate container engine. Windows application developers can also integrate Linux container workloads through the dedicated container API.
For enterprises, supported Microsoft management policies, registry restrictions and endpoint security integrations provide additional opportunities to govern Linux container usage on Windows devices.
However, WSL containers are not automatically a complete replacement for Docker Desktop, Windows containers, Kubernetes or dedicated Linux production infrastructure. Adoption should be based on verified application requirements and the capabilities available in the installed release.
Official References and Additional Resources
The following official Microsoft resources provide documentation, configuration details, release information and further technical guidance:
- Microsoft Developer - Windows Subsystem for Linux and WSL Container General Availability
- Microsoft Learn - WSL Container CLI and API Documentation
- Microsoft Learn - Get Started with WSL Containers
- Microsoft Learn - WSL Container Settings
- Microsoft Learn - WSL Enterprise Management and Intune Settings
- Microsoft Windows Command Line Blog - Original WSL Container Public Preview Announcement
- Microsoft Learn - Overview of Containers on Windows
- Microsoft WSL Official GitHub Repository
- Microsoft WSL Official Releases and Release Notes
Documentation verification note: The availability and technical requirements described in this article reflect Microsoft documentation available as of December 1, 2026. The exact general availability announcement date has not been established here. Command examples have been reviewed against documented container workflows but have not been independently executed on a Windows test computer. Administrators should consult current release documentation before implementing the platform in production environments.
Was this guide useful?
Your answer helps us keep BISONKB accurate and practical.