Install WSL on Windows 11 with wsl --install
In short
- wsl --install needs Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 111.
- The command enables the WSL and Virtual Machine Platform components, installs the latest Linux kernel, sets WSL 2 as the default and installs Ubuntu2.
- New Linux installations made with wsl --install use WSL 2 by default1.
- Your Linux user name and password are separate from your Windows account, and that user can run sudo commands2.
- Windows does not update your Linux distribution for you. On Ubuntu or Debian, run sudo apt update && sudo apt upgrade2.
To install the Windows Subsystem for Linux, open PowerShell as administrator, run wsl --install, then restart your PC1. The command turns on the features WSL needs and installs Ubuntu1. To pick another distribution, list them with wsl.exe --list --online and install one with wsl.exe --install -d [Distro]1. Check versions with wsl.exe --list --verbose1.
Before you start
You need Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11. On older versions, Microsoft points to its manual install steps1.
The install needs PowerShell running as administrator, and you must restart the PC1. WSL 2 also needs virtualization turned on in your PC's BIOS and a CPU that supports Second Level Address Translation (SLAT)3.
The wsl --install command only works if WSL is not installed at all1.
Steps
Open PowerShell as administrator. Right-click PowerShell and select Run as administrator1.
See the available distributions (optional). Run this command to list the Linux distributions you can download1:
wsl.exe --list --onlineInstall WSL. Run the install command. It enables the features WSL needs and installs the Ubuntu distribution1:
wsl --installTo install a different distribution, use the
-dflag and replace[Distro]with its name1:wsl.exe --install -d [Distro]Restart your PC. Restart to finish the installation1.
Open your distribution. Open it from the Start menu, for example "Ubuntu". The first launch asks you to wait while files decompress. Later launches take less than a second1.
Create your Linux user. Enter a User Name and Password. Nothing appears on screen while you type the password, and this is normal2.
Update your packages. Windows does not update your Linux distribution for you. On Ubuntu or Debian, run2:
sudo apt update && sudo apt upgrade
Check it worked
List your installed distributions and the WSL version each one uses1:
wsl.exe --list --verboseNew installations made with wsl --install use WSL 21. To move a distribution to the other version, replace <Distro> with its name and pick 1 or 21:
wsl.exe --set-version <Distro> <1|2>Common problems
wsl --install only shows the WSL help text. WSL is already installed. Run wsl --list --online to see the distributions, then wsl --install -d <DistroName> to install one1.
The install hangs at 0.0%. Download the distribution before installing it1:
wsl --install --web-download -d <DistroName>"Error: 0x80370102 The virtual machine could not be started because a required feature is not installed." Enable the Virtual Machine Platform Windows feature and make sure virtualization is enabled in the BIOS. Your PC maker's guidance explains the BIOS step. Restart the PC afterwards3.
"Installation failed with error 0x80070003". WSL only runs on your system drive, usually C:. On Windows 11, open Settings > System > Storage > Advanced storage settings > Where new content is saved and choose the system drive3. This error can also mean virtualization is off in the BIOS3.
"The term 'wsl' is not recognized as the name of a cmdlet, function, script file, or operable program." Make sure the Windows Subsystem for Linux optional component is installed. On an ARM64 device, run wsl.exe from PowerShell Core or Command Prompt instead3.
Questions
- Which Linux distribution does wsl --install add?
- Ubuntu, by default. Use the -d flag to install a different one, and run wsl.exe --list --online to see what is available1.
- How do I check if I'm on WSL 1 or WSL 2?
- Run wsl -l -v. To switch a distribution, run wsl.exe --set-version <Distro> <1|2>, for example wsl --set-version Ubuntu 21.
- I forgot my Linux password. How do I reset it?
- Open PowerShell and run wsl -u root. Then run passwd <username>, enter a new password and confirm it. Close WSL with exit2.
- How do I update WSL itself?
- Run wsl.exe --update in PowerShell3.
2 Sept 2026: Published.