Set Up WSL2 for Development on Windows

Install the Windows Subsystem for Linux 2 and a Linux distro so you get a real Linux environment alongside Windows.

beginner10 minwindowsUpdated August 2026
#windows#wsl#linux#developer-setup

Requirements

  • Windows 10 version 2004+ or Windows 11
  • Admin access to PowerShell
0/4 steps · 0%
01

Install WSL

Open PowerShell as Administrator and run:

powershell
$ wsl --install

This enables the required Windows features, installs the WSL2 kernel, and installs Ubuntu as the default distro. Restart when prompted.

02

Create your Linux user

After restarting, Ubuntu launches automatically and finishes setup. You'll be asked to create a Linux username and password — this is separate from your Windows login and can be anything.

03

Verify the installation

powershell
$ wsl --list --verbose

Expected output

  NAME      STATE           VERSION
* Ubuntu    Running         2

Confirm the VERSION column shows 2, not 1 — WSL2 is what gives you a full Linux kernel and much better performance.

Success

You now have a real Linux environment running inside Windows.

04

Optional: install an additional distro

powershell
$ wsl --list --online
$ wsl --install -d Debian

Tip

You can run multiple distros side by side and switch between them with wsl -d <name>.

Troubleshooting

WSL itself is enabled, but the separate Linux kernel package it depends on is missing or outdated.

powershell
$ wsl --update