How to Install WSL on Windows

Windows Subsystem for Linux illustration

Windows Subsystem for Linux lets you run a real Linux environment inside Windows without dual-booting or managing a separate virtual machine app.

This applies to Windows 10 version 2004 or later and Windows 11 using WSL 2.

Does This Affect You?

WSL is useful for developers, command-line tools, scripting, Linux package managers, and learning Linux while staying inside Windows.

Install WSL with One Command

  1. Open PowerShell or Windows Terminal as administrator.
  2. Run wsl --install.
  3. Wait while Windows enables required components and downloads Ubuntu by default.
  4. Restart if prompted.
  5. Open Ubuntu from Start and create a Linux username and password. This is separate from your Windows login.

Install a Specific Distribution

  1. Open PowerShell as administrator.
  2. Run wsl --list --online to see available distributions.
  3. Run wsl --install -d Debian, replacing Debian with the distribution name you want.
  4. Install more distributions later with the same command and a different name.
  5. Run wsl --list --verbose to see installed distributions and WSL versions.

Using WSL After Install

Access Files Both Ways

Windows drives appear inside Linux under /mnt/c/, /mnt/d/, and so on. From Windows File Explorer, enter wsl$ to browse Linux files.

Use VS Code with WSL

Visual Studio Code’s WSL extension lets you open folders inside Linux and use a Linux terminal directly from the editor.

If Install Fails

Check that virtualization is enabled in BIOS/UEFI and that Windows 10 is version 2004 or later. Look for Intel VT-x, AMD-V, or SVM Mode settings.

Remove WSL Later

Run wsl --unregister <name> to delete a distribution and its Linux files. Turn off WSL and Virtual Machine Platform in Windows Features to remove the platform.

Sources

  • Microsoft Learn: Install WSL
  • Microsoft Learn: WSL basic commands
  • Microsoft Learn: Comparing WSL 1 and WSL 2
Disclosure: This post may contain affiliate links which means I may receive a commission for purchases made through links. I will only recommend products that I have personally used! Learn more on my Private Policy page.
A thoughtful woman reads a newspaper while enjoying coffee at an indoor workspace.

DEALWEEK

SUBSCRIBE AND GET 20% OFF YOUR NEXT ORDER! OFFER ENDS SOON - DON’T MISS OUT!

We don’t spam! Read our privacy policy for more info.

Shopping Cart