How to enable WSL2 on Windows 10 and Windows 11
Windows version requirements, virtualization BIOS setting, enabling WSL feature, enabling Virtual Machine Platform, wsl --install command, restart behavior
Enabling WSL2
WSL2 requires Windows 10 version 2004 (Build 19041) or higher, or any Windows 11 build. Check your version by pressing Win + R, typing winver, and pressing Enter.
Before you run anything
Open your BIOS and confirm that Intel VT-x or AMD-V (hardware virtualization) is enabled. Most modern machines have this on by default, but some OEM laptops ship with it disabled. Without it, the Hyper-V layer WSL2 relies on will not start.
One-command install (Windows 11 / updated Win10)
# Run in PowerShell as Administrator
wsl --installThis single command enables the Virtual Machine Platform and Windows Subsystem for Linux features, downloads the Linux kernel update, sets WSL2 as the default version, and installs Ubuntu. Restart when prompted.
Manual install (older builds)
# Step 1 — enable WSL
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
# Step 2 — enable VM Platform
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# Step 3 — set WSL2 as default
wsl --set-default-version 2After restarting, install a distro from the Microsoft Store (Ubuntu 22.04 LTS is recommended). The first launch asks you to create a Linux username and password — these are independent of your Windows credentials.
