Enabling the Windows Subsystem for Linux (WSL) adds a native Linux environment to Windows for development, automation, and troubleshooting without setting up a separate virtual machine or dual-boot installation.
The wsl.exe command installs and manages distributions and the underlying platform, with WSL 1 translating Linux system calls and WSL 2 running a real Linux kernel inside a lightweight virtualized environment for broader compatibility, including container workloads.
Because WSL 2 depends on hardware virtualization, firmware settings may need adjustment and a reboot is typically required after Windows features are enabled. For performance-sensitive work, file placement matters, since projects stored inside the distribution’s Linux filesystem usually perform better than the same files stored under /mnt/c.
Related: How to install an X server in Windows
Related: How to install Android apps on Windows
Use winver from Run to display the installed Windows version and build number.
Common labels include Intel VT-x, AMD-V, and SVM Mode.
wsl --install Installing: Windows Subsystem for Linux Installing: Virtual Machine Platform Installing: Ubuntu The requested operation is successful. Changes will not be effective until the system is rebooted.
wsl.exe enables the required Windows features and installs a default distribution unless --no-distribution is used.
wsl --set-default-version 2 Default version of WSL set to 2
New distributions default to WSL 2 after this change.
Search for Ubuntu, Debian, or other supported distributions and select Install.
The first launch prompts for a new Linux username and password.
wsl -l -v NAME STATE VERSION * Ubuntu Running 2
Switch an existing distribution to WSL 2 with
wsl --set-version <distribution-name> 2
when VERSION shows 1.