Skip to content

Commit 466a6f2

Browse files
Updated
1 parent 1e07392 commit 466a6f2

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

WSL/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
href: networking.md
5353
- name: Use systemd to manage services
5454
href: systemd.md
55+
- name: WSL container
56+
href: wsl-container.md
5557
- name: How-to
5658
items:
5759
- name: Import any Linux distribution

WSL/wsl-container.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: WSL container
3+
description: An overview of what the WSL container feature is, and how to use it to run Linux container workflows on Windows
4+
keywords: BashOnWindows, bash, wsl, windows, windows subsystem, distro, custom, Linux, container
5+
ms.date: 05/01/2026
6+
ms.topic: how-to
7+
ms.custom: sfi-image-nochange
8+
---
9+
10+
# WSL container
11+
12+
WSL container is a new feature coming to WSL with the goal of making it easier to use Linux containers on Windows. It has two major components: a CLI called `wslc.exe` to build, run and interact with Linux containers and a WSL container API allowing Windows app developers to use Linux containers as part of their app logic.
13+
14+
Currently WSL container is in development, and since WSL is open sourced you can view the progress at [the WSL GitHub repo microsoft/wsl](https://github.com/microsoft/wsl). To learn more when this feature is fully released please stay tuned to the [Windows command line blog](https://aka.ms/cliblog)!
15+
16+
## WSL container CLI
17+
18+
In the next WSL update, `wslc.exe` will be an included command as part of the regular update. Its goal is to have a familiar CLI interface, allowing you to easily build, run and interact with Linux containers.
19+
20+
See some of the example commands below:
21+
22+
```powershell
23+
# Run a container
24+
wslc run --rm -it ubuntu:latest bash -c "echo Hello world from WSL container!"
25+
# List available images
26+
wslc image ls
27+
# Run a web server
28+
wslc run -it --rm -d -p 8080:80 --name web nginx
29+
# Get its content
30+
curl localhost:8080
31+
# List the container
32+
wslc container ps
33+
# Stop the container
34+
wslc container stop web
35+
```
36+
37+
## WSL container API
38+
39+
Windows applications can make use of Linux containers as well! A nuget package will be available allowing you to programmatically pull, run, and interact with Linux containers. Including key interactions like stdin and stdout, file mounts, networking mounts, GPU access and more.

0 commit comments

Comments
 (0)