WSL2 Ubuntu 20.04.6 LTS not working: WslRegisterDistribution failed with error: 0x80070490
If you are encountering an error message "WslRegisterDistribution failed with error: 0x80070490" while trying to use WSL2 on Ubuntu 20.04.6 LTS, don't worry. This issue can be resolved by following a few simple steps.
What is WSL2?
WSL2 (Windows Subsystem for Linux 2) is a compatibility layer provided by Microsoft that allows you to run a Linux distribution on Windows 10. It provides a full-fledged Linux kernel and provides a seamless integration between Windows and Linux environments.
Understanding the Error
The error "WslRegisterDistribution failed with error: 0x80070490" occurs when there is a problem registering the Ubuntu 20.04.6 LTS distribution with WSL2. This error is usually caused by a corrupt or missing system file.
Solution
To resolve this issue, you can follow the steps below:
- Open the Start menu and search for "Command Prompt". Right-click on "Command Prompt" and select "Run as administrator".
- In the Command Prompt window, type the following command and press Enter:
dism.exe /online /cleanup-image /restorehealth - Wait for the command to complete. This may take a few minutes.
- Once the command completes successfully, restart your computer.
- After restarting, open the Start menu and search for "PowerShell". Right-click on "Windows PowerShell" and select "Run as administrator".
- In the PowerShell window, type the following command and press Enter:
wsl --unregister Ubuntu-20.04 - Wait for the command to complete. This will unregister the Ubuntu 20.04.6 LTS distribution.
- Next, type the following command and press Enter:
wsl --set-version Ubuntu-20.04 2 - Wait for the command to complete. This will set the Ubuntu 20.04.6 LTS distribution to use WSL2.
- Finally, type the following command and press Enter:
wsl --set-default-version 2 - Restart your computer once again.
- After the restart, open the Microsoft Store and search for "Ubuntu 20.04". Install the Ubuntu 20.04.6 LTS distribution from the Microsoft Store.
- Once the installation is complete, launch the Ubuntu 20.04.6 LTS distribution from the Start menu or by typing "ubuntu2004" in the Command Prompt or PowerShell.
Now, you should be able to use WSL2 with Ubuntu 20.04.6 LTS without encountering the "WslRegisterDistribution failed with error: 0x80070490" error.
Conclusion
The error "WslRegisterDistribution failed with error: 0x80070490" can be frustrating when trying to use WSL2 on Ubuntu 20.04.6 LTS. However, by following the steps mentioned above, you can resolve this issue and enjoy a seamless Linux experience on your Windows 10 machine.
References
| Reference | Link |
|---|---|
| Microsoft Docs - Windows Subsystem for Linux Installation Guide for Windows 10 | https://docs.microsoft.com/en-us/windows/wsl/install-win10 |
| Microsoft Tech Community - WSLRegisterDistribution failed with error 0x80070490 | https://techcommunity.microsoft.com/t5/windows-dev-appconsult/wslregisterdistribution-failed-with-error-0x80070490/ba-p/2340376 |