How to fix WSL 2 is not installed in Docker
This error appears when Docker Desktop cannot find WSL 2 (Windows Subsystem for Linux 2) on your Windows system. Docker Desktop requires WSL 2 as its backend to run Linux containers on Windows 10/11, and this message indicates the required Windows features are not enabled or properly configured.
Quick fix
Fixes WSL 2 is not installed
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart- Check your Windows version
- Enable required Windows features via PowerShell
- Install the WSL 2 Linux kernel update
- Set WSL 2 as the default version
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestartdism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestartWSL 2 is not installed
What this error means
Docker Desktop for Windows uses WSL 2 as its default backend for running Linux containers. WSL 2 provides a lightweight virtual machine with a real Linux kernel, which Docker needs to run containers efficiently. When you see 'WSL 2 is not installed', it means Docker Desktop detected that either the WSL feature itself, the Virtual Machine Platform feature, or both are not enabled on your Windows system. This is a common issue for new Docker Desktop installations, after Windows updates that may reset features, or when switching from the legacy Hyper-V backend to the WSL 2 backend. The good news is that WSL 2 is available on all Windows 10 (version 1903+) and Windows 11 editions, including Home editions, so this is purely a configuration issue that can be resolved without additional software purchases.
Typical symptoms
- Docker Desktop displays 'WSL 2 is not installed' error dialog on startup
- Docker Desktop prompts to install WSL 2 with a link to documentation
- Unable to start Docker Desktop engine
- Docker Desktop settings show WSL 2 option grayed out or unavailable
- Error message suggests running PowerShell commands to enable features
- Docker Desktop worked before but stopped after a Windows update
Common causes
- Windows Subsystem for Linux feature is not enabled
- Virtual Machine Platform feature is not enabled
- WSL 2 Linux kernel update package is not installed
- WSL default version is set to 1 instead of 2
- Virtualization is disabled in BIOS/UEFI settings
- Windows version is too old (requires Windows 10 version 1903 or higher)
- Recent Windows update reset the WSL configuration
- Group Policy is blocking WSL installation in enterprise environments
How to fix "WSL 2 is not installed"
WSL 2 requires Windows 10 version 1903 (build 18362) or higher, or Windows 11. Check your version by pressing Win + R, typing winver, and pressing Enter.
If your version is older than 1903, you'll need to update Windows before proceeding. Go to Settings > Update & Security > Windows Update and install all available updates.
Open PowerShell as Administrator (right-click Start menu > Windows Terminal (Admin) or PowerShell (Admin)) and run these commands:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestartBoth commands should complete with 'The operation completed successfully.' Restart your computer after running these commands.
After restarting, download and install the WSL 2 Linux kernel update package from Microsoft:
1. Go to https://aka.ms/wsl2kernel
2. Download the wsl_update_x64.msi file (or ARM64 version for ARM devices)
3. Run the installer and follow the prompts
Alternatively, you can run this command in an elevated PowerShell:
wsl --updateOpen PowerShell as Administrator and set WSL 2 as the default:
wsl --set-default-version 2You should see 'The operation completed successfully.' If you see an error about kernel component updates, go back to step 3.
Confirm WSL is properly installed by running:
wsl --statusThis should show the default WSL version as 2. You can also run:
wsl -l -vThis lists installed distributions and their WSL versions. It's okay if no distributions are listed - Docker Desktop will create its own.
On Windows 10 version 2004 or later, you can use a single command that handles everything:
wsl --install --no-distributionThis enables all required features and installs the WSL 2 kernel. The --no-distribution flag skips installing Ubuntu since Docker Desktop doesn't require a Linux distribution. Restart your computer after this command completes.
If you still see errors about virtualization, you may need to enable it in your BIOS/UEFI:
1. Restart your computer and enter BIOS setup (usually by pressing F2, F12, Del, or Esc during boot)
2. Look for settings like 'Intel Virtualization Technology', 'Intel VT-x', 'AMD-V', or 'SVM Mode'
3. Enable the virtualization setting
4. Save and exit BIOS
The exact location varies by motherboard manufacturer. Consult your motherboard or laptop manual if needed.
After completing the above steps and restarting your computer:
1. Open Docker Desktop from the Start menu
2. If prompted, select 'Use WSL 2 instead of Hyper-V'
3. Wait for Docker to finish starting
You can verify Docker is using WSL 2 by going to Settings > General and confirming 'Use the WSL 2 based engine' is checked.
Advanced notes
Enterprise/Domain Environments: If you're on a corporate network, Group Policy may prevent enabling Windows features. Contact your IT department to request WSL 2 be enabled, or check if there's a pre-approved Docker Desktop installation package.
Minimum WSL Version: Docker Desktop requires at least WSL version 2.1.5 for full compatibility. Run wsl --version to check. If your version is older, run wsl --update to get the latest.
Hyper-V Alternative: On Windows Pro/Enterprise, you can use the Hyper-V backend instead of WSL 2. In Docker Desktop settings, uncheck 'Use the WSL 2 based engine'. However, WSL 2 is recommended for better performance and compatibility.
Virtual Machine Hosts: If you're running Windows inside a virtual machine (VMware, VirtualBox, etc.), ensure nested virtualization is enabled on the host. Without this, WSL 2 cannot function.
Windows Server: WSL 2 is available on Windows Server 2022 and later. For older Windows Server versions, use Docker Engine directly instead of Docker Desktop.
Frequently asked questions
- What does "WSL 2 is not installed" mean?
- Docker Desktop for Windows uses WSL 2 as its default backend for running Linux containers. WSL 2 provides a lightweight virtual machine with a real Linux kernel, which Docker needs to run containers efficiently. When you see 'WSL 2 is not installed', it means Docker Desktop detected that either the WSL feature itself, the Virtual Machine Platform feature, or both are not enabled on your Windows system.
- How do I fix "WSL 2 is not installed"?
- This error appears when Docker Desktop cannot find WSL 2 (Windows Subsystem for Linux 2) on your Windows system. Docker Desktop requires WSL 2 as its backend to run Linux containers on Windows 10/11, and this message indicates the required Windows features are not enabled or properly configured.
- What causes "WSL 2 is not installed"?
- Windows Subsystem for Linux feature is not enabled Virtual Machine Platform feature is not enabled WSL 2 Linux kernel update package is not installed
- Is the "WSL 2 is not installed" error serious?
- Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.
Official resources & further reading
- ๐Docker Official Documentation
- ๐Docker Docs - WSL 2 backend on Windows(Official Docs)
- ๐Docker Docs - Install Docker Desktop on Windows(Official Docs)
- ๐Docker Docs - WSL Best Practices(Official Docs)
- ๐ฌStack Overflow - Docker WSL 2 is not installed(Stack Overflow)
- ๐ฌStack Overflow - WSL 2 error when opening Docker Desktop(Stack Overflow)
- ๐
- ๐
- ๐Microsoft - WSL 2 Linux kernel update(Official Docs)