
Windows Subsystem for Linux (WSL) is a powerful tool that enables users to run Linux distributions on Windows without the need for a virtual machine or dual-boot setup. However, many users encounter the error WslRegisterDistribution failed with error: 0x80004005, which prevents them from successfully installing or running a Linux distribution.
This error can occur due to multiple reasons, such as incorrect system settings, permission issues, virtualization problems, or corrupt installation files. In this guide, we will explore the causes and provide step-by-step solutions to fix this issue effectively.
Common Causes of WslRegisterDistribution Failed With Error: 0x80004005
Before diving into the solutions, let’s understand the possible reasons behind this error:
- Windows Subsystem for Linux is not enabled
- Virtualization is disabled in BIOS
- Corrupt or incomplete WSL installation
- Permission issues when accessing WSL files
- System file corruption affecting WSL
- Windows Defender or third-party antivirus interference
- Windows version incompatibility with WSL 2
- Hyper-V is not properly configured
How to Fix WslRegisterDistribution Failed With Error: 0x80004005
Enable Windows Subsystem for Linux (WSL)
One of the most common causes of this error is that WSL is not enabled on your system. Follow these steps to enable it:
- Open PowerShell as an administrator.
- Run the following command:
- dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- After the process completes, restart your computer.
- Try launching your Linux distribution again.
Enable Virtualization in BIOS
WSL 2 requires virtualization to be enabled in the BIOS settings. Follow these steps:
- Restart your computer and enter the BIOS/UEFI settings (usually by pressing F2, F10, DEL, or ESC during boot).
- Look for an option called Intel VT-x, AMD-V, or Virtualization Technology.
- Enable the setting and save changes.
- Restart your computer and try running WSL again.
Set WSL 2 as the Default Version
If you are using WSL 2, you need to set it as the default version:
- Open PowerShell as an administrator.
- Run the command:
- wsl –set-default-version 2
- Try reinstalling your Linux distribution.
Reinstall the WSL Feature
Sometimes, reinstalling WSL can resolve the issue:
Open PowerShell as an administrator and run:
wsl –unregister
Replace with the name of your installed Linux distribution (e.g., Ubuntu).
Disable WSL by running:
dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart
Restart your computer.
Re-enable WSL using the command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Restart again and reinstall the Linux distribution from the Microsoft Store.
Check and Repair Corrupt System Files
Corrupt system files may cause the error. Run the System File Checker (SFC) tool:
Open Command Prompt as administrator.
Run the following command:
sfc /scannow
Wait for the process to complete and restart your computer.
Reset Windows Store Cache
If the problem persists, resetting the Microsoft Store cache may help:
- Press Win + R, type wsreset, and press Enter.
- Wait for the process to complete.
- Restart your computer and try reinstalling the Linux distribution.
Disable or Configure Windows Defender and Third-Party Antivirus
Security software can interfere with WSL installation. Try temporarily disabling your antivirus and Windows Defender:
- Open Windows Security and go to Virus & threat protection.
- Click Manage settings and turn off Real-time protection.
- If using third-party antivirus software, disable it and try running WSL again.
Check Windows Version Compatibility
WSL 2 is only supported on Windows 10 version 1903 or later. To check your version:
- Open Run (Win + R) and type winver.
- Press Enter and verify your Windows version.
- If your version is outdated, update Windows by going to Settings > Update & Security > Windows Update.
Enable and Configure Hyper-V
If WSL 2 is not working, enabling Hyper-V may help:
Open PowerShell as administrator and run:
dism.exe /online /enable-feature /featurename:Microsoft-Hyper-V-All /all /norestart
Restart your computer.
Try running your Linux distribution again.
Restart LxssManager Service
The LxssManager service manages WSL distributions. Restarting it can fix issues:
Press Win + R, type services.msc, and press Enter.
Scroll down to LxssManager.
Right-click and select Restart.
Try launching WSL again.
Reinstall Linux Distribution
If all else fails, try reinstalling your Linux distribution:
Open PowerShell as administrator and run:
wsl –unregister
Open Microsoft Store, search for your Linux distribution, and reinstall it.
Run WSL and check if the issue is resolved.