How to Install WSL Containers in Windows 11
WSL containers run Linux applications directly inside Windows 11 without a separate virtual machine. This feature bridges the Windows Subsystem for Linux (a tool that lets you run Linux software on Windows) with container platforms like Docker.
Microsoft introduced this capability in WSL version 1.0.0 to speed up container workflows. You skip heavy setup steps and run your containers directly inside your normal Windows workspace. It is a preview feature, so commands and output may change between builds. WSL itself works the same on Windows 11 Home and Pro.
Open Command Prompt as Administrator, run wsl –update –pre-release, then wsl –shutdown to apply the pre-release build that includes container support. Check the version with wsl –version to confirm it shows 2.9.3.0 or higher.
Step 1Get Your WSL Ready for the Preview
Start by updating the Windows Subsystem for Linux (WSL). The container tools ship only in the pre-release channel of WSL, so the regular update is not enough. The whole setup is three short commands plus a check at the end, and none of them needs a download from a website.
Open Command Prompt as Administrator
Certain system operations, such as updating WSL, require administrative privileges in the terminal. Without them, the update can fail with a permissions error or appear to do nothing.
- Right-click the Start button.
- Select Terminal (Admin). If you only see Windows Terminal, either use the admin option or search for Command Prompt in Start and choose Run as administrator.
- Click Yes when User Account Control asks whether to allow the app to make changes.
The terminal opens, and its title bar should show “Administrator”. If it does not, close it and start again, because the later commands will not apply properly without elevation.
Update WSL to the Pre-Release Version
Windows Subsystem for Linux (WSL - a tool that lets you run Linux on Windows) needs an update to its pre-release version before you can install WSL containers. This makes sure your system has the new features needed for container support.
- In the administrator Command Prompt or Terminal, type wsl --update --pre-release.
- Press Enter.
- Wait while the latest test files download and install. You should see progress text, followed by a message that the update finished. The time depends on your connection.
If the command reports that no update is available, you are probably already on the latest pre-release build. Carry on to the next step.
Run `wsl --update --pre-release` to download the newest test packages. This can take a few minutes depending on your network speed.
Restart WSL
Windows Subsystem for Linux (WSL) must shut down completely to apply the new pre-release updates. WSL keeps a background service running even when no Linux window is open, so closing your distro windows is not enough.
- Save your work in every Linux environment you have open. This command closes them right away without asking for confirmation.
- In the administrator Command Prompt, type wsl --shutdown.
- Press Enter.
The prompt simply returns. That is normal, and it means all WSL processes have stopped. WSL starts again on its own the next time you launch a distro or run a WSL command, so you do not have to restart Windows for this step.
wsl --shutdownThis command stops all active WSL processes without showing much visual feedback. A blank response is the expected result.
wsl --shutdown.Active Linux processes close instantly upon execution.
Step 2Check Your WSL Installation
After the update and shutdown, check that the system recognizes the new container features. If the update asked you to restart Windows, do that first, then come back to these checks.
Check the WSL Version
Checking the installed WSL version confirms the update was applied. Use the version command from the block below in the same administrator terminal.
- Run the command and press Enter.
- Read the WSL version line in the output.
wsl --versionA version string matching 2.9.3.0 or higher should appear. If you see an older version, the pre-release update did not apply. Run the update step again, shut WSL down again, and recheck.
Confirm the New Container Tool
Next, make sure the container tool itself is installed and responds.
- In the administrator Command Prompt, type wslc --help.
- Press Enter.
A long list of commands and usage instructions appears on screen if the installation worked and the container tool is ready to use. If you get an error saying the command is not recognized instead, see the troubleshooting tip below.
wslc --helpA displayed list of options and usage instructions confirms the system is on the right track. WSL Containers are installed and ready for deployment.
Troubleshooting Tip: If the wslc --help command fails, work through these checks in order:
- Verify that
wsl --update --pre-releasecompleted without errors. - Re-run
wsl --shutdown. - Close the Command Prompt or Terminal window entirely, then open a fresh instance and retry
wslc --help. - If it still fails, restart Windows. A full system reboot occasionally resolves persistent configuration snags.
Reference:
https://learn.microsoft.com/en-us/windows/wsl/wsl-container?tabs=csharp
Summary
This guide covered installing the WSL Containers preview on Windows 11. You updated WSL to the pre-release build, shut WSL down so the changes could apply, restarted Windows if needed, and verified the result by checking the WSL version and running the container tool's help command.
Have a question about this guide?
Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.
Did this guide fix your problem?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!