/
/

How to Enable or Disable Windows Subsystem for Linux WSL in Windows 10

How to Enable or Disable Windows Subsystem for Linux WSL in Windows 10 blog banner image

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:

  1. Press Win + R, type control, and hit Enter.
  2. In the Control Panel (Icons view), select Programs and features > Turn Windows Features on or off.
  3. Scroll down the Windows Features list.
    1. Check the box for Windows Subsystem for Linux to enable the service.
    2. Uncheck the box for Windows Subsystem for Linux to disable the service.
  4. Click OK.
  5. 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.

  1. Open an elevated Command Prompt or elevated PowerShell prompt.
  2. Enter the following command and hit Enter:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

  1. Restart the PC to apply changes.

Method 3: Disable WSL via PowerShell

  1. Open an elevated PowerShell prompt.
  2. Enter the following command and hit Enter:

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

  1. When prompted to restart, press Y.
  2. 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.
    1. Open an elevated PowerShell.
    2. Run the following code to check:

dism.exe /online /get-features /format:table | findstr /c:"Microsoft-Windows-Subsystem-Linux"

    1. 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.
    1. Open an elevated PowerShell.
    2. 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.
    1. Open an elevated PowerShell.
    2. Run the following code to check:

dism.exe /online /get-features /format:table | findstr /c:"Microsoft-Windows-Subsystem-Linux"

    1. 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.
    1. Open an elevated PowerShell.
    2. 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.

  1. Head to the Microsoft Store.
  2. Search for the Linux distro you want (e.g., Ubuntu, Kali Linux, Debian, etc.)
  3. Click on the app you want.
  4. 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.

FAQs

Yes. Starting from version 2004, WSL can be activated on Windows 10 Home edition, and if your Windows 10 build supports it, WSL 2 is automatically installed.

Feature WSL 1 WSL 2
Architecture Uses a translation layer Uses a compact Virtual Machine (VM) to operate a full Linux kernel
Performance Faster Windows file access Better when processing Linux-native files
System Call Compatibility Limited Full compatibility between Windows and Linux
Docker Support Limited Full support, allowing seamless file sharing between Windows and Linux environments
Startup Time Faster Slightly slower due to VM startup

 

Upgrading to WSL 2 lets IT support staff utilize a virtual machine to run a full Linux kernel. Here’s how you upgrade to WSL 2:

⚠️This method requires administrative privileges.

  1. Confirm that your system is running Windows 10 build 19041.264 or a more recent update.
    1. Press Win + R, type msinfo32, and hit Enter.
    2. Check the Version to see if the Windows 10 system can support WSL 2.
  2. Download and install the latest Linux kernel update (wsl_update_x64.msi).
  3. In an elevated Command Prompt/PowerShell, type the following code and press Enter:

wsl --set-default-version 2

  1. Run this code to check the list of installed distros and their versions:

wsl --list --verbose

  1. Run this code to update your preferred distro to WSL 2:

wsl --set-version <DistroName> 2

Replace <DistroName> with the name of the specific distro you want to use in WSL 2 (e.g. Ubuntu, Arch Linux, etc.)

  1. Restart the PC to apply changes.

🛑| Update your WSL distributions for consistent stability and compatibility.

Read NinjaOne’s guide on how to update and upgrade WSL distro packages.

No, turning off the Windows Subsystem for Linux (WSL) in Windows Features won’t remove any of your installed distros from the system. However, they will become inaccessible until you re-enable WSL.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).