sodcalculator

10 Tech How-To

WSL Install Added in Windows 10 Build?

Guide 10-32231 · Updated · Step by step

The Windows Subsystem for Linux (WSL) was first added to Windows 10 in build 14393, which shipped with the Windows 10 Anniversary Update in August 2016. That initial release was a beta feature that required enabling Developer Mode and installing a single Ubuntu distribution from the Windows Store.

Background: Why Microsoft Built WSL

Before WSL, developers who needed a Linux environment on a Windows machine had to run a full virtual machine (like VirtualBox or VMware) or dual-boot. Both approaches were heavy: VMs consumed gigabytes of RAM and disk space, and dual-booting meant rebooting every time you switched operating systems. Microsoft built WSL to give developers a native Linux-compatible kernel interface inside Windows, so they could run command-line tools like grep, awk, ssh, and package managers like apt without leaving Windows. The first version, now called WSL 1, was not a real Linux kernel. It was a translation layer that mapped Linux system calls to Windows kernel calls. That design made it fast and lightweight, but it also meant some Linux applications that relied on kernel internals would not run correctly.

How the Original Installation Worked

In Windows 10 build 14393, installing WSL was a multi-step process that is quite different from today’s one-command setup:

  • Open Settings > Update & Security > For developers and enable Developer Mode.
  • Open an elevated PowerShell or Command Prompt and run Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux.
  • Reboot the computer.
  • Open the Microsoft Store, search for “Ubuntu,” and install the distribution.
  • Launch the installed distribution from the Start menu, create a UNIX username and password, and then run sudo apt update to update the package list.

That was the entire flow. The Ubuntu app was a lightweight launcher that downloaded the actual root filesystem on first run. If you skipped Developer Mode, the feature would not install, and the Store app would fail with a specific error. Microsoft removed the Developer Mode requirement in later builds, and in Windows 11 you can install WSL with a single wsl --install command.

WSL 1 vs WSL 2: What Changed

WSL 1 was the only option for the first few years. It worked well for file manipulation, scripting, and running simple servers, but it had known compatibility gaps. For example, Docker containers that required Linux kernel features like cgroups or overlayfs would fail. This led Microsoft to build WSL 2, which was introduced in Windows 10 build 19041 (version 2004, May 2020). WSL 2 uses a real Linux kernel running in a lightweight virtual machine. That change brought near-full system call compatibility, so Docker Desktop could run Linux containers natively, and tools like fuse and systemd (later) worked as expected. The trade-off is that WSL 2 uses more memory and has slightly slower file I/O when accessing Windows files from Linux, because of the VM boundary. You can still choose which version to use per distribution with wsl --set-version <distro> 1 or wsl --set-version <distro> 2.

How to Choose Between WSL 1 and WSL 2

For most users, WSL 2 is the better default because of its compatibility. However, there are cases where WSL 1 is preferable:

  • Project files on Windows drives: If your code lives on C:\ and you access it from Linux, WSL 1 is faster because it reads directly from the Windows filesystem. WSL 2’s VM boundary adds overhead for cross-OS file access.
  • Low-memory machines: WSL 2 reserves memory for the VM, which can be a problem on systems with 4 GB of RAM or less. WSL 1 uses almost no extra memory.
  • Networking: WSL 2 uses a virtual network adapter, which can complicate connections to services running on the Windows host (like a database). WSL 1 shares the host’s network stack, so localhost works seamlessly in both directions.
  • Kernel modules: If you need to load custom kernel modules, you must use WSL 2, because WSL 1 does not have a real kernel.

You can check the current version of a distribution with wsl -l -v in PowerShell or Command Prompt.

Common Problems and Fixes

WSL installation and usage can hit a few common snags. Here are the typical issues and how to resolve them:

  • “WSL optional component is not enabled” – Run the PowerShell command to enable the feature, then reboot. In Windows 10 versions before 2004, you also needed Developer Mode.
  • “The requested operation is not supported” – This often appears when trying to install a distribution from the Store without having the WSL feature enabled first. Enable the feature, reboot, then install.
  • “Error 0x80070003” – Usually means the distribution’s installation directory is on a different drive than the Windows system drive. Uninstall the distribution and reinstall it, or move the installation directory using wsl --export and wsl --import.
  • “WSL 2 requires an update” – On older Windows 10 builds, you need to install the “WSL 2 Linux kernel update package” from Microsoft’s website. This is a one-time manual download.
  • Networking issues in WSL 2 – If you cannot connect to a service running on Windows, try using the Windows host’s IP address (found with ipconfig) instead of localhost. In newer versions, localhost forwarding works automatically, but it can fail on some VPNs.

Security and Performance Considerations

WSL is not a sandbox. A process running inside WSL has the same user privileges as your Windows user, and it can access your Windows files through /mnt/c. That means malware running in WSL can read and modify your Windows files without any extra permission checks. Treat WSL like any other development environment: do not run untrusted scripts, and keep the distribution’s packages updated with sudo apt update && sudo apt upgrade. Performance-wise, WSL 1 is lighter on RAM and faster for file I/O on Windows drives, while WSL 2 is faster for CPU-intensive tasks and has better compatibility. For heavy workloads, consider giving WSL 2 more memory by creating a .wslconfig file in your Windows user folder with entries like memory=4GB or processors=2. That file is read when you restart WSL with wsl --shutdown.

Alternatives to WSL

WSL is not the only way to run Linux on Windows. The main alternatives are:

  • Full virtual machine – Tools like VirtualBox, VMware, or Hyper-V give you a complete Linux desktop with full isolation. This is the best choice if you need a GUI environment or need to test kernel modules. The downside is higher resource usage and slower startup.
  • Docker Desktop – If you only need to run Linux containers, Docker Desktop uses WSL 2 as its backend on Windows. It gives you a consistent container environment without managing a full VM.
  • Dual boot – Installing Linux on a separate partition gives you full native performance, but you can only run one OS at a time. This is useful for gaming or hardware-specific Linux work.
  • Cloud Linux – For development, you can rent a cloud VM and use SSH from Windows. This is a good option if you need a persistent server environment.

Frequently Asked Questions

Do I need to enable Developer Mode for WSL in Windows 10?

Only in the original build 14393 (Anniversary Update) and a few subsequent builds. Microsoft removed the Developer Mode requirement in Windows 10 version 1803 (build 17134) and later. If you are on an older build, you must enable Developer Mode; on newer builds, you only need to enable the Windows Subsystem for Linux optional feature.

Can I install WSL on Windows 10 Home?

Yes. WSL works on both Home and Pro editions of Windows 10. The only feature that requires Pro or Enterprise is Hyper-V, which is used by WSL 2. However, WSL 2 can run on Home because Microsoft includes a special hypervisor platform component that does not require the full Hyper-V feature to be enabled.

How do I update WSL to the latest version?

On Windows 10, you can update WSL by running wsl --update in an elevated PowerShell or Command Prompt. This command is available from Windows 10 version 2004 (build 19041) onwards. For older builds, you need to manually download and install the WSL 2 kernel update package from Microsoft’s website.

Can I run graphical Linux applications with WSL?

Yes, but only with WSL 2 and Windows 10 build 19044 (version 21H2) or later, which includes WSLg (Windows Subsystem for Linux GUI). WSLg lets you run Linux GUI apps like Firefox or GIMP directly, without an X server. On earlier builds, you can use a third-party X server like VcXsrv, but the setup is more complex.

What is the default Linux distribution in WSL?

There is no default. You can install Ubuntu, Debian, Kali, openSUSE, Alpine, and others from the Microsoft Store. If you run wsl --install on Windows 11, it installs Ubuntu by default, but on Windows 10 you must choose a distribution from the Store manually.

How do I uninstall a WSL distribution?

You can uninstall a distribution like any other Store app: right-click the app in the Start menu and select Uninstall, or use wsl --unregister <DistroName> in PowerShell. The --unregister command also deletes all files inside that distribution, so back up anything important first.

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 →