The Windows Subsystem for Linux (WSL) allows power users to run a Linux environment on a Windows machine. This no-cost feature offers powerful coding tools, high customizability, and native support for popular programming languages. Knowing how to activate it gives you more control over your system’s resources.
This guide walks you through how to disable and enable WSL, the most-asked questions, and the best troubleshooting solutions.
How to disable and enable WSL
⚠️These methods require administrative privileges.
Method 1: Enable or disable WSL via Control Panel (GUI)
The simplest way to toggle Windows Subsystem for Linux (WSL) is through Windows Features. Here’s how:
- Press Win + R, type control, and hit Enter.
- In the Control Panel (Icons view), select Programs and features > Turn Windows Features on or off.
- Scroll down the Windows Features list.
- Check the box for Windows Subsystem for Linux to enable the service.
- Uncheck the box for Windows Subsystem for Linux to disable the service.
- Click OK.
- Click Restart now to apply your changes.
Method 2: Enable WSL via command-line tool
Here are the steps to turn WSL on via Command Prompt or PowerShell for hands-free operations.
- Open an elevated Command Prompt or elevated PowerShell prompt.
- Enter the following command and hit Enter:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- Restart the PC to apply changes.
Method 3: Disable WSL via PowerShell
- Open an elevated PowerShell prompt.
- Enter the following command and hit Enter:
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
- When prompted to restart, press Y.
- Press Enter to confirm your choice.
WSL Requirements
Admin permissions
Managing system features, applying kernel changes, and configuring Windows features affect all users on a Windows machine. To toggle WSL properly, sign in with admin privileges or operate an elevated shell.
Windows 10 build 14393 or newer (WSL 1)
WSL 1 was first introduced in the 2016 anniversary update, so Windows 10 builds that were released prior are unable to run WSL 1.
Windows 10 build 19041.264 or newer (WSL 2)
WSL 2 requires Windows 10 build 19041.264 or later builds to work because it requires a specific Linux kernel package (wsl_update_x64.msi), which is only supported by Win 10 and its succeeding versions.
Virtualization is enabled in BIOS (WSL 2)
WSL 2 offers complete system call support and runs a full Linux kernel inside a virtual machine. As such, services like Intel VT-x or AMD-V must be activated in a workstation’s BIOS in order to fully support WSL 2.
Troubleshooting the Windows Subsystem for Linux (WSL)
Configuring your computer’s WSL can lead to complications, but the most common issues have simple fixes.
WSL is not recognized after reboot
If WSL won’t launch properly, or if you receive an “Command not found” error code while attempting to start WSL, do the following:
- Verify that the WSL feature is enabled.
- Open an elevated PowerShell.
- Run the following code to check:
dism.exe /online /get-features /format:table | findstr /c:"Microsoft-Windows-Subsystem-Linux"
-
- If WSL is disabled, run the following code to turn the feature back on.
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- Confirm that the Virtual Machine Platform is enabled.
- Open an elevated PowerShell.
- Run the following code:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- Restart your PC to apply changes
WSL fails to run with version 2
If you see errors like “WSL 2 requires an update to its kernel component” or “Please enable the Virtual Machine Platform”, try the following fixes:
- Install the WSL 2 kernel update (wsl_update_x64.msi) manually.
- Ensure virtualization settings are enabled in BIOS/UEFI.
- Verify that the WSL feature is enabled.
- Open an elevated PowerShell.
- Run the following code to check:
dism.exe /online /get-features /format:table | findstr /c:"Microsoft-Windows-Subsystem-Linux"
-
- If WSL is disabled, run the following code to turn the feature back on.
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- Confirm that the Virtual Machine Platform is enabled.
- Open an elevated PowerShell.
- Run the following code:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
WSL command not found
If you still receive a “command not found” error code with WSL, try these troubleshooting tips:
- Ensure WSL is installed.
- Open an elevated Command Prompt/PowerShell.
- Run the following code to install WSL:
wsl --install
- Check your Windows version.
- Press Win + R, type msinfo32, and hit Enter.
- Check the Version to see if your Windows 10 system can support WSL 1 or 2.
- Verify the WSL file path is correct.
- %SystemRoot%\System32 is the correct file path which becomes referenced during app launch.
Windows Subsystem for Linux has no installed distributions error
If you receive this error, your WSL cannot read any installed distros on your PC. To fix this, properly install (or reinstall) your desired Linux distro from the Microsoft Store.
- Head to the Microsoft Store.
- Search for the Linux distro you want (e.g., Ubuntu, Kali Linux, Debian, etc.)
- Click on the app you want.
- Select Get or Install.
Manage Windows Subsystem for Linux (WSL) utilization
The Windows Subsystem for Linux (WSL) is a powerful IT management feature that allows users to harness Linux’s modular capabilities on Windows systems. And while it expands your IT support staff’s toolkit, learning how to manage background processes like WSL is also key to optimizing performance.