WSL 2 (Windows Subsystem for Linux)
Real Linux directly in Windows, for AI programs that run better on Linux or only run there.
- By
- Microsoft
- Use
- Command line
- Price
- free
- License
- MIT
- Version
- 3.0.3 (Oct 9, 2026)
What is WSL 2 (Windows Subsystem for Linux)?
With WSL 2, a Linux distribution like Ubuntu runs directly in Windows, without dual boot. Many AI projects are developed for Linux first, and this lets you use them on your Windows PC too. Docker Desktop uses WSL 2 underneath. You mainly work in the terminal, so it is more for advanced users.
For you if an AI guide is written only for Linux or you want to use Docker.
Strengths
- Install with a single command
- Linux guides usually work right away
- NVIDIA GPU can be used in WSL 2
- Foundation for Docker Desktop
Weaknesses
- Operated almost entirely through the command line
- Extra storage space for the Linux environment
- File access between Windows and Linux can be cumbersome
Does it run on your system?
| Operating system | Hardware | ||
|---|---|---|---|
| Windows | yes | NVIDIA | yes |
| Linux | no | AMD | unclear |
| macOS | no | Intel Arc | unclear |
| Apple (M chips) | no | ||
| processor only | yes |
According to Docker docs, NVIDIA GPUs can be used in WSL 2 via GPU paravirtualization (current driver and `wsl --update` required). We have not tested this with AMD or Intel.
Installation
Open PowerShell as administrator, type `wsl --install`, and restart. By default, Ubuntu is installed as WSL 2; you need Windows 10 version 2004 or later, or Windows 11.
Download programs only from the official site or the official repository.
License
Alternatives
Known errors and solutions
- could not select device driver "" with capabilities: [[gpu]] (Docker cannot pass the graphics card through to the container)
- Docker Desktop: WSL needs updating / WSL 2 installation is incomplete
- hipErrorNoBinaryForGpu: Unable to find code object for all current devices! (ROCm has no matching code for your AMD card)
- nvidia-smi: command not found in WSL (CUDA not available in WSL — the only correct driver is the Windows driver)
- pip: error: externally-managed-environment (Linux/WSL)
- WSL 2: 0x80370102 – Virtualization not enabled
Sources
- https://learn.microsoft.com/en-us/windows/wsl/install
- https://github.com/microsoft/WSL
- https://github.com/microsoft/WSL/releases
- https://github.com/microsoft/WSL/releases/tag/3.0.3
- https://docs.docker.com/desktop/features/gpu/
Checked on Oct 21, 2026. Questions about WSL 2 (Windows Subsystem for Linux)? Ask in the forum.