Install WSL 2 on Windows | Generated by AI

Home 2026.07

Installing WSL 2 (Windows Subsystem for Linux 2) is straightforward on modern Windows 10 and Windows 11.

  1. Open PowerShell or Command Prompt as Administrator.
  2. Run:
wsl --install

This command will:

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:


Official Microsoft guide

For detailed instructions and troubleshooting, see:

Install WSL on Windows (Microsoft Learn)

If you tell me:

I can provide instructions specific to your system.


Generated by AI. Curating and sharing still takes effort. If you find it useful, feel free to donate. WeChat: @lzwjavaWeChat QR · X: @lzwjava · Say hi 👋

Back Donate