How to Fix WSL: Error code: Wsl/Service/0x80040326
Introduction⌗
When you use Windows 10/11 with the WSL service, you can encounter the following error
Error: 0x80040326
Error code: Wsl/Service/0x80040326
The terminal won’t open and you will keep staying in a loop when you close and open it.
How to fix it⌗
1. Open Windows Powershell in administrator mode⌗
This will allow you to run the following commands in elevated mode:
PS C:\Users\mossad> wsl -l
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)
docker-desktop
docker-desktop-data
PS C:\Users\mossad> wsl -d Ubuntu-20.04
Error: 0x80040326
Error code: Wsl/Service/0x80040326
The first command wsl -l
will list the distributions of Linux that you have show the current default
one with the issues.
The second command wsl -d Ubuntu-20.14
attempts to start the WSL service with that ditribution and has the same error we are solving.
2. Update WSL and shut it down completely⌗
You need to update your WSL service and you do that with wsl --update
. Lastly, you shutdown the WSL service using wsl --shutdown
.
PS C:\Users\mossad> wsl --update
Checking for updates.
Updating Windows Subsystem for Linux...
PS C:\Users\martinmusale> wsl --shutdown
3. Test that the error is fixed⌗
You can then run wsl -d Ubuntu-20.14
again to ascertain that the error has now been fixed. You should get no error in the output.
PS C:\Users\martinmusale> wsl -d Ubuntu-20.04
Now you can open up the WSL terminal and the error is gone.
Conclusion⌗
We have seen how you fix the wsl service error code Wsl/Service/0x80040326
by updating WSL and shutting it down.