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
Steps to enable Windows Subsystem for Linux (WSL) on Windows:
- Confirm the system is running Windows 10 version 2004 or later, or Windows 11.
Use winver from Run to display the installed Windows version and build number.
- Enable hardware virtualization in firmware or BIOS when using WSL 2.
Common labels include Intel VT-x, AMD-V, and SVM Mode.
- Open PowerShell or Windows Terminal as an administrator.

- Install WSL and a default Linux distribution using the built-in installer.
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.
- Restart Windows to finish enabling the WSL components.
- Set WSL 2 as the default version for new distributions.
wsl --set-default-version 2 Default version of WSL set to 2
New distributions default to WSL 2 after this change.
- Install additional Linux distributions from the Microsoft Store when required.
Search for Ubuntu, Debian, or other supported distributions and select Install.
- Launch an installed distribution from the Start menu to complete first-run user creation.
The first launch prompts for a new Linux username and password.
- Verify installed distributions and their WSL versions.
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.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
