How to Install WSL on Windows
Getting WSL2 and a Linux distro running from a clean Windows install using the single-command path, plus what to check if it doesn't work the first time.
Installing WSL today is dramatically simpler than its original multi-step setup process — this walks through the current, streamlined path.
Step 1: check your Windows version meets the minimum requirement
winver
WSL2 requires Windows 10 version 2004 (Build 19041) or higher, or any version of Windows 11 — check this first if the install command fails unexpectedly.
Step 2: open PowerShell or Command Prompt as Administrator
Start menu → search "PowerShell" →
right-click → "Run as administrator"
Administrator privileges are required specifically for the initial installation, since it enables Windows features and installs system-level components.
Step 3: run the single install command
wsl --install
This single command enables the necessary Windows features (WSL and Virtual Machine Platform), downloads and installs the Linux kernel component, sets WSL2 as the default version, and installs Ubuntu as the default distro — all in one step.
Step 4: restart your computer when prompted
A restart is required after the initial feature installation for the changes to fully take effect — the installation process will prompt you when this is needed.
Step 5: complete the first-run distro setup
After restart, the installed distro launches automatically
and prompts for a Unix username and password
This username and password are specific to your Linux environment, separate from your Windows account credentials.
Step 5b: understand systemd is likely already on by default
Recent Ubuntu images installed through wsl --install enable systemd as the default init system already, a change from WSL’s original lightweight-init-only behavior — if you’re specifically checking for this, ps -p 1 showing systemd rather than a bare shell or /init confirms it without any separate configuration step being necessary.
Step 6: verify the installation
cat /etc/os-release
uname -r
Confirming the distro identifies itself correctly and that uname -r shows a WSL2-specific kernel version string confirms a working installation.
Step 7: install a different distro if you don’t want the Ubuntu default
wsl --list --online
wsl --install -d Debian
The first command lists all distros available for installation; the second installs a specific one by name instead of the Ubuntu default.
Step 8: if the install command fails, check the specific error
Common failure points: virtualization disabled in firmware,
a conflicting virtualization product, or an outdated
Windows version — see this blog's dedicated troubleshooting
guide for a distro that won't start
If the single command doesn’t complete cleanly, the dedicated troubleshooting guide for a distro that won’t start walks through the specific common causes systematically.
Why the single-command path is worth using even if you know the manual steps
Beyond the convenience, wsl --install is Microsoft’s actively maintained, tested installation path — it correctly sequences feature enablement, kernel installation, and distro setup in a way that’s easy to get wrong doing manually, particularly for a first-time WSL setup on an unfamiliar machine.
What this single command replaced
Before wsl --install existed, getting WSL2 running required manually enabling two separate Windows optional features, downloading and installing a separate Linux kernel update package, manually setting WSL2 as the default version, and separately installing a distro from the Microsoft Store — a genuinely multi-step process with several places a first-time user could get stuck or skip a step. Consolidating all of this into one command was a deliberate simplification aimed specifically at reducing that first-time setup friction.
Confirming you’re on WSL2, not the older WSL1, for a specific distro
wsl --list --verbose
The version column in this output shows whether each installed distro is running as WSL1 or WSL2 — worth checking explicitly rather than assuming, particularly on a machine that’s been through multiple WSL installations or updates over time, since WSL1 and WSL2 have meaningfully different capabilities (WSL2’s real kernel enables GPU compute, full networking, and more that WSL1’s syscall-translation approach cannot support at all).
Converting an existing WSL1 distro to WSL2
wsl --set-version Ubuntu 2
If a specific distro shows as WSL1 and you want the capabilities WSL2 provides, this converts it in place — the process re-encodes the distro’s filesystem into WSL2’s virtual disk format, which can take some time depending on how much data the distro contains, and is worth doing on a distro you can afford to have briefly unavailable during the conversion.
Setting up a second machine identically
If you regularly set up new machines and want the same distro and configuration each time, wsl --install -d <DistroName> combined with a saved wsl.conf and any post-install setup script (installing common packages, configuring your shell) turns a repeatable manual process into a short, scriptable sequence — worth building out once you’ve done the manual setup enough times to know exactly what you actually always configure the same way regardless of the machine.
Uninstalling a distro cleanly if you want to start over
wsl --unregister <DistroName>
This removes the distribution and its entire filesystem permanently, giving you a genuinely clean slate to reinstall from — worth knowing as the actual reset button for a distribution that’s accumulated configuration you no longer trust, rather than trying to manually undo every change made since first install.
Related:
- Installing WSL Goes From a Multi-Step Process to One Command
- Fixing a WSL Distro That Won’t Start or Hangs on ‘Installing’
Sources: