Install WSL
Prerequisites
You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11.
If you’re running an older build, or just prefer not to use the install command and would like step-by-step directions, see WSL manual installation steps for older versions.
Install
Open PowerShell (or Windows Command Prompt) and enter:
wsl --install
The --install command performs the following actions:
- Enables the optional WSL and Virtual Machine Platform components
- Downloads and installs the latest Linux kernel
- Sets WSL 2 as the default
- Downloads and installs the Ubuntu Linux distribution by default
When it’s completed and you restart your machine, your distribution will start after you boot up again, completing the installation.
References