How to Disable WSL Entirely Using Regedit

This guide explains how to completely disable Windows Subsystem for Linux (WSL) integration across your system using the Windows Registry Editor. By modifying specific system policies and service configurations in the registry, you can prevent WSL from running, restrict user access to Linux environments, and turn off background Linux subsystem services.

Method 1: Disable WSL via System Policy

Configuring the system policy key prevents any user on the machine from launching or installing WSL environments.

  1. Press Win + R, type regedit, and press Enter to open the Registry Editor.

  2. Navigate to the following path:

    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
  3. Right-click the Windows folder, select New > Key, and name the new key WSL.

  4. Select the newly created WSL key.

  5. In the right pane, right-click any empty space, select New > DWORD (32-bit) Value, and name it AllowWSL.

  6. Double-click AllowWSL and ensure its Value data is set to 0.

  7. Click OK.


Method 2: Disable the WSL Background Services

To ensure that the core background integration services for WSL do not start automatically, you can disable their corresponding service entries in the registry.

  1. In the Registry Editor, navigate to:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager
  2. In the right pane, locate and double-click the Start value.

  3. Change the Value data to 4 (Disabled) and click OK.

  4. Next, navigate to:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wslservice

    (Note: If this key does not exist on your version of Windows, you can skip this step).

  5. Double-click the Start value, change the Value data to 4, and click OK.


Finalize the Configuration

After making the registry modifications:

  1. Close the Registry Editor.
  2. Restart your computer to apply the policy changes and stop all active subsystem processes.

Once restarted, Windows Subsystem for Linux integration will be fully disabled across the operating system.