How to Install WSL (Linux) on Windows 10

Last updated on November 10th, 2026 at 10:11 am

Windows 10 version 2004 (build 19041) or later installs WSL with one command. Right-click Start, select Windows PowerShell (Admin), type wsl --install, press Enter and restart. Ubuntu then opens and asks for a Linux username and password.

WSL runs Linux tools on Windows without a virtual machine. Check your Windows 10 version if unsure. Windows 11 users should install WSL on Windows 11, and for a full Linux desktop you can dual boot Windows 10 with Linux.

Install WSL with one command

  1. Right-click Start and select Windows PowerShell (Admin). Select Yes if asked.
  2. Type wsl --install and press Enter.
  3. Wait for WSL and Ubuntu to install, then restart your PC.
Windows 10 PowerShell window running wsl --install with the success message highlighted
Run wsl –install (1). When it says the operation succeeded (2), restart the PC.

This turns on the features WSL needs and installs Ubuntu, the default Linux distribution.

How do I uninstall WSL completely?

Unregister your distributions, then uninstall Windows Subsystem for Linux from Apps & features and turn it off in Turn Windows features on or off.

Next, you might install Docker, which can use WSL 2, or mount a Linux drive on Windows. If a tool needs a folder on the Windows PATH, open the environment variables settings. Developers can also run a database inside Ubuntu, for example by following the steps to install Redis in Windows 10.

Every install option, including the offline method, is on Install WSL.

Set up your Linux user

  1. After the restart, Ubuntu opens by itself. If it doesn’t, open Ubuntu from the Start menu.
  2. Wait a minute while it finishes installing.
  3. Enter a username and password for Linux. They don’t have to match your Windows account.
Ubuntu console on Windows 10 asking for a new UNIX username with the prompt highlighted
Create a Linux username (1). When you see the prompt (2), Linux is ready.

You won’t see anything as you type the password. That’s normal.

Install a different Linux distribution

  • To see what’s available, run wsl --list --online.
  • To install one, run wsl --install -d followed by its name, such as wsl --install -d Debian.
  • You can also get distributions from the Microsoft Store.

Useful WSL commands

  • wsl opens your default distribution.
  • wsl --list --verbose shows installed distributions and whether each uses WSL 1 or WSL 2.
  • wsl --set-default-version 2 makes new distributions use WSL 2.
  • wsl --update updates WSL.
  • wsl --shutdown stops all running distributions.

Keep WSL up to date

Run wsl --update in PowerShell or Command Prompt to get the latest WSL version, and wsl --version to see what you have. Update the Linux packages separately inside Ubuntu with sudo apt update && sudo apt upgrade. That same command keeps Linux tools like OpenSSL patched, which is one of the simpler ways to get OpenSSL on Windows 10.

Can I run Linux apps with a window?

Yes, on Windows 10 version 21H2 or later with an up-to-date WSL. Run wsl –update, then install a Linux app with a graphical interface and start it from the Linux terminal. It opens in its own window.

Back up, move or remove a distribution

  • Back up: wsl --export Ubuntu D:\Backups\ubuntu.tar saves the whole Linux system to one file.
  • Restore or move: wsl --import Ubuntu2 D:\WSL\Ubuntu2 D:\Backups\ubuntu.tar brings it back, even on another drive.
  • Remove: wsl --unregister Ubuntu deletes the distribution and everything inside it, so back up first.

Limit how much memory WSL uses

WSL 2 can use a lot of RAM. To cap it, create a text file named .wslconfig in your user folder (C:\Users\YourName) containing these two lines:

  • [wsl2]
  • memory=4GB

Then run wsl --shutdown and start Linux again.

Check and change the WSL version

WSL 2 runs a real Linux kernel and is faster for most tasks, so it’s the default. Older setups may still use WSL 1. To check, run wsl -l -v in PowerShell. The VERSION column shows 1 or 2 for each distribution.

  • To switch a distribution to WSL 2, run wsl –set-version Ubuntu 2, using the name from the list.

Converting can take several minutes for a large distribution. WSL 2 needs virtualization turned on in your PC’s firmware settings.

Install WSL without internet access

If the PC can’t reach the Microsoft Store or download sites, Microsoft supports an offline install:

  1. On another PC, download the latest WSL .msi package from the WSL releases page on GitHub, plus a Linux distribution as a .wsl file, and copy both to this PC.
  2. Install the .msi package.
  3. In PowerShell as an administrator, run dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart, then restart.
  4. Install the distribution from the .wsl file, for example by double-clicking it.

If the install doesn’t work

  • You see the WSL help text instead. WSL is already partly installed. Run wsl --list --online, then wsl --install -d Ubuntu.
  • It stops at 0.0%. Run wsl --install --web-download -d Ubuntu.
  • The command isn’t recognized. Your Windows 10 is older than version 2004, so update Windows 10 first.
  • An error mentions virtualization. Turn on virtualization in your PC’s BIOS or UEFI settings.