How to Install WSL (Windows Subsystem for Linux) on Windows

Windows Subsystem for Linux — better known as WSL — lets you run a genuine Linux environment directly inside Windows, without dual-booting or setting up a virtual machine. Whether you're a developer who needs Linux command-line tools, a student learning bash scripting, or someone running Linux-native software, WSL removes most of the friction that used to make this difficult.

Here's a clear walkthrough of how WSL installation works, what choices you'll face along the way, and why your specific setup determines how the process plays out.

What WSL Actually Is (And Why It Matters)

WSL is a compatibility layer built into Windows 10 and Windows 11 that allows Linux binaries to run natively. WSL 2, the current and recommended version, uses a lightweight real Linux kernel running inside a managed virtual machine. This gives you near-native performance for file system operations and full system call compatibility — meaning most Linux software just works.

WSL 1 still exists and takes a different approach: it translates Linux system calls into Windows calls rather than running a real kernel. It's faster in some cross-OS file scenarios but lacks compatibility with software that requires a full Linux kernel.

Most users installing today should target WSL 2 unless they have a specific reason not to.

System Requirements Before You Start

Not every Windows machine is ready to install WSL without a few checks first.

RequirementWSL 1WSL 2
Windows versionWindows 10 build 1607+Windows 10 build 19041+ (version 2004+) or Windows 11
VirtualizationNot requiredMust be enabled in BIOS/UEFI
RAMNo strict minimum4 GB+ recommended
Architecturex64 or ARM64x64 or ARM64

The most common setup blocker for WSL 2 is virtualization not being enabled in firmware settings. On most machines this is labeled as Intel VT-x, AMD-V, or SVM Mode in the BIOS/UEFI. If it's off, WSL 2 won't run.

The Fastest Way to Install WSL 🖥️

On Windows 10 (build 19041 and later) and Windows 11, Microsoft significantly simplified the process. A single command handles everything:

  1. Open PowerShell or Command Prompt as Administrator
  2. Run:
wsl --install 

This one command does the following automatically:

  • Enables the WSL optional feature
  • Enables the Virtual Machine Platform feature
  • Downloads and installs the WSL 2 Linux kernel
  • Sets WSL 2 as the default version
  • Installs Ubuntu as the default Linux distribution

After the install completes, restart your computer. On reboot, the Ubuntu setup will launch and ask you to create a Linux username and password. These credentials are separate from your Windows login.

Choosing a Different Linux Distribution

Ubuntu is installed by default, but it's not your only option. WSL supports multiple distributions available through the Microsoft Store or directly via the command line.

To see what's available, run:

wsl --list --online 

To install a specific distribution instead of Ubuntu:

wsl --install -d <DistributionName> 

Common options include Debian, Kali Linux, openSUSE, Ubuntu variants (20.04, 22.04, 24.04), and Oracle Linux. You can also install multiple distributions and run them side by side — each maintains its own isolated file system.

Which distribution makes sense depends on your workflow. Ubuntu is the most documented and beginner-friendly. Debian is leaner. Kali is built for security and penetration testing tooling. These aren't interchangeable choices if your work depends on specific package ecosystems.

Manual Installation (Older Windows 10 Versions)

If your Windows 10 build is older than 19041, the single-command approach won't work. The manual steps are:

  1. Enable the Windows Subsystem for Linux feature via PowerShell:

    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart 
  2. Enable Virtual Machine Platform (for WSL 2):

    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart 
  3. Restart your machine

  4. Download and install the WSL 2 Linux kernel update package from Microsoft's documentation site

  5. Set WSL 2 as default:

    wsl --set-default-version 2 
  6. Install a Linux distribution from the Microsoft Store

This path involves more steps and a separate kernel package download — a meaningful difference if you're deploying across multiple machines or working in a restricted environment.

After Installation: What Changes on Your System

Once WSL is running, you'll have access to a full Linux terminal environment. A few things worth knowing: 🔧

  • Your Windows file system is accessible from Linux at /mnt/c/ (or the relevant drive letter)
  • Your Linux file system is accessible from Windows Explorer via the network path \wsl$
  • You can run Linux commands directly from Windows Terminal, which integrates WSL profiles natively
  • VS Code with the Remote – WSL extension lets you edit Linux-side files with a full GUI editor

Performance for file-heavy operations (like compiling large codebases) is notably better when working within the Linux file system rather than accessing Windows drives through /mnt/.

The Variables That Affect Your Experience

WSL installation itself is fairly standardized, but what happens afterward — and whether it meets your needs — depends on several factors specific to your situation:

  • Windows build version determines which installation method applies to you
  • Virtualization support in your hardware determines whether WSL 2 is even an option
  • The Linux distribution you choose affects available packages, community support, and default tooling
  • Your use case — web development, data science, security research, learning Linux basics — points toward different distributions and configurations
  • Whether you're on a managed work machine may restrict what features or Store access you have

Someone running Windows 11 on a modern machine with virtualization already enabled will have a noticeably smoother path than someone on an older Windows 10 system with firmware settings that need adjustment first. The command is the same; the environment around it isn't.