sodcalculator

10 Tech How-To

Install Windows Subsystem for Linux (WSL) Distros in Windows 10

Guide 10-58187 · Updated · Step by step

Yes, you can install Windows Subsystem for Linux (WSL) distributions on Windows 10, and the process is straightforward. This guide walks you through enabling WSL, installing a distro from the Microsoft Store or command line, and getting your Linux environment running in minutes.

What Is WSL and Why Use It?

Windows Subsystem for Linux is a compatibility layer that lets you run a full Linux user space—bash, utilities, and applications—directly on Windows 10 without a virtual machine or dual-boot setup. It is especially useful for developers who need Linux tools (like grep, sed, ssh, or Python packages) but prefer to stay in the Windows ecosystem. WSL 1 translates Linux system calls to Windows calls; WSL 2 runs a lightweight virtual machine with a real Linux kernel, giving better compatibility and performance for most workloads.

Prerequisites and System Requirements

  • Windows 10 version 2004 or higher (Build 19041+) for WSL 2. Older versions can use WSL 1, but features are limited.
  • 64-bit CPU with virtualization support (Intel VT-x or AMD-V) enabled in BIOS/UEFI for WSL 2.
  • At least 4 GB RAM (8 GB recommended) for comfortable use.
  • Administrator access to run the enabling commands.

Step-by-Step: Enable WSL and Install a Distro

  1. Open PowerShell as Administrator (right-click Start, select “Windows PowerShell (Admin)”).
  2. Enable the WSL feature by running: dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  3. Enable Virtual Machine Platform (required for WSL 2): dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  4. Restart your computer when prompted.
  5. Set WSL 2 as default (optional but recommended): wsl --set-default-version 2
  6. Install a distribution from the Microsoft Store (search for “Ubuntu”, “Debian”, “Kali Linux”, etc.) or via command line: wsl --install -d Ubuntu
  7. Launch the distro from the Start menu or by typing wsl in a terminal. The first launch asks you to create a UNIX username and password.

Choosing the Right Distribution

The most popular choice is Ubuntu because of its large community, extensive documentation, and default package manager (apt). Debian is similar but more minimal. Kali Linux is geared toward security testing. openSUSE and Alpine are lighter alternatives. If you are unsure, start with Ubuntu—it has the broadest support and most tutorials online.

Common Issues and How to Fix Them

  • WSL 2 requires an update: If you get “WSL 2 requires an update”, download the latest WSL 2 kernel update from Microsoft’s official site and install it.
  • Virtualization is disabled: Check BIOS/UEFI settings and enable VT-x/AMD-V. You can verify by running systeminfo in PowerShell and looking for “Hyper-V Requirements”.
  • Store install fails: Try installing via command line with wsl --install -d Ubuntu instead.
  • Distro won’t launch: Ensure the Windows Subsystem for Linux feature is enabled; run wsl --status to check.
  • No internet inside WSL: This is rare, but restarting the LxssManager service (in Services.msc) or restarting Windows usually fixes it.

WSL 1 vs WSL 2: Which Should You Use?

WSL 2 offers faster file I/O and full system call compatibility, making it better for Docker, Node.js, and most development tools. However, it uses more memory and has a slight performance penalty for cross-OS file access (files stored on the Windows drive). WSL 1 is lighter and faster for simple tasks but lacks full kernel features. For most users, WSL 2 is the recommended default.

Managing Multiple Distros

You can install several distros side by side. Use wsl --list --verbose to see installed distros and their versions. To set a default distro, run wsl --set-default <DistroName>. You can launch a specific distro with wsl -d <DistroName>. To uninstall, remove it from the Microsoft Store or use wsl --unregister <DistroName> (this deletes all data inside that distro).

Frequently Asked Questions

Is WSL free?

Yes, WSL itself and all distributions listed in the Microsoft Store are free. There is no cost to enable or use them.

Can I run GUI apps on WSL?

Yes, with WSL 2 on Windows 10 you can install a GUI (like GNOME or XFCE) and use an X server such as VcXsrv or the built-in WSLg feature (available on Windows 11, but on Windows 10 you need a third-party X server).

How do I access Windows files from WSL?

Your Windows drives are mounted under /mnt/c/, /mnt/d/, etc. For example, cd /mnt/c/Users/YourName takes you to your Windows user folder.

Can I run Docker inside WSL?

Yes, Docker Desktop integrates with WSL 2. You can also install Docker Engine directly inside a WSL 2 distro, but Docker Desktop is the easiest way.

Does WSL slow down my computer?

WSL 2 uses a lightweight VM, so it consumes some RAM (by default up to 50% of total RAM, but configurable). WSL 1 has almost no overhead. Overall, the impact is minimal for typical development work.

What is the difference between WSL and a virtual machine?

WSL runs Linux as a subsystem, sharing the Windows kernel (WSL 1) or using a lightweight VM (WSL 2). It is faster to start and integrates seamlessly with Windows files and tools. A traditional VM (like VirtualBox) runs a full OS with its own kernel, providing better isolation but requiring more resources and a slower boot.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →