Install WSL 2 on Windows | Generated by AI
Installing WSL 2 (Windows Subsystem for Linux 2) is straightforward on modern Windows 10 and Windows 11.
Option 1: One-command installation (recommended)
- Open PowerShell or Command Prompt as Administrator.
- Run:
wsl --install
This command will:
- Enable WSL
- Install WSL 2
- Download the Linux kernel
- Install Ubuntu (by default)
- Configure everything automatically
Restart your computer if prompted. (Microsoft Learn)
Verify the installation
After restarting, open PowerShell and run:
wsl --status
To see installed distributions:
wsl --list --verbose
You should see something like:
NAME STATE VERSION
Ubuntu Running 2
If the version is 2, you’re using WSL 2. (Microsoft Learn)
Install a different Linux distribution
To see available distributions:
wsl --list --online
Install one, for example:
wsl --install -d Ubuntu
or
wsl --install -d Debian
If you already have WSL 1
Convert an existing distribution to WSL 2:
wsl --set-version Ubuntu 2
Replace Ubuntu with your distribution name if necessary. (Microsoft Learn)
Check Windows version
WSL 2 requires:
- Windows 11, or
- Windows 10 version 1903 or later (with the required build updates). (Microsoft Learn)
Official Microsoft guide
For detailed instructions and troubleshooting, see:
Install WSL on Windows (Microsoft Learn)
If you tell me:
- your Windows version (Windows 10 or 11), and
- the output of
winver
I can provide instructions specific to your system.
