How to Install Linux on Windows 10 With WSL

To run Linux commands inside Windows 10, install Windows Subsystem for Linux (WSL) and a Linux distribution such as Ubuntu. Windows remains the operating system that starts when you turn on the PC. For a full Linux desktop selected at startup, follow the Ubuntu dual-boot instructions instead.

Install WSL and a distribution

  1. Press Windows key + R, enter winver, and check the build. Microsoft’s simple installation command requires Windows 10 version 2004, build 19041, or later. Earlier builds require different setup instructions. An eligible build for WSL may still be outside standard Windows 10 support.
  2. On an eligible PC, open PowerShell as administrator. For a new installation with the default Ubuntu distribution, enter wsl --install. Let it finish, then restart Windows if prompted.
  3. If you want a different distribution, or WSL is already present and the command shows help, run wsl --list --online. Use the name exactly as shown with wsl --install -d NAME, replacing NAME with the distribution name. For example, if the listing contains Ubuntu, the command is wsl --install -d Ubuntu.

Start Linux and check the installation

  1. Launch the distribution from Start, or enter wsl -d Ubuntu from PowerShell if Ubuntu is the installed name. On first launch, allow time for the distribution files to unpack. When prompted, create a Linux username and password. The password may show no characters while you type. These are Linux credentials for this distribution, separate from your Windows sign-in.
  2. In the Linux shell, run cat /etc/os-release to see the distribution information. Type exit to return to PowerShell, then run wsl --list --verbose to see the installed distribution and its WSL version. A stopped distribution is still installed.

If the command or distribution is missing

If Windows does not recognize the install option, confirm the build and use Microsoft’s WSL installation instructions. If a distribution download stalls at 0.0%, Microsoft documents wsl --install --web-download -d NAME as an alternative. A virtualization error needs its specific error code and the PC’s hardware prerequisites checked before another installation attempt. See Microsoft’s WSL troubleshooting guide.

Use the WSL command reference to list and launch distributions. Avoid unregistering one as a troubleshooting shortcut because that deletes the distribution and its Linux files. If your next step is running containers, check Docker Desktop’s Windows and WSL requirements.