Error: 0x80070040
Hello, I receive below error message when trying to run bash on windows 10. Tried running it as admin - same error.
C:\WINDOWS\system32>bash Error: 0x80070040 Press any key to continue...
This was working before, only thing i remember changing was to create a user account for RSA authentication to a Cisco device, but as far as I remember I was still able to launch it after. There is similar topic https://github.com/Microsoft/WSL/issues/62
Tried uninstall and re-install ubuntu sub-system - still getting same error. Also installed openSUSE and it works, but I have never used it and I'm not comfortable with it.
Any suggestions?
Thanks,
Also receive this since a few days ago. Haven't really done anything special that could cause this, but I can supply necessary logs to try and find the problem.
ok, this worked for me, and allowed me to reinstall the ubuntu distro.
in cmd
-
you can see the list of installed distros: wslconfig /l
-
delete distro for the list wslconfig /u ubuntu
-
try to run ubuntu distro installer "Installing, this may take a few minutes... Installation successful!..."
Error: 0x80070040 is gone!!!
Encountered similar issue before (Error: 0x80070040) and it was fixed by the following:
c:> bash.exe Error: 0x80070040
List all distributions
c:> wslconfig /l Windows Subsystem for Linux Distributions: Legacy (Default) Ubuntu-16.04
Set ubuntu as default
c:> wslconfig /setdefault Ubuntu-16.04
test-run bash. No error is displayed
c:> bash.exe username@pc-abc:[/mnt/c]:
List again and Ubuntu is set as default
c:> wslconfig /l Windows Subsystem for Linux Distributions: Ubuntu-16.04 (Default) Legacy
Uninstall Legacy
c:> wslconfig /u Legacy Unregistering...
c:> wslconfig /l Windows Subsystem for Linux Distributions: Ubuntu-16.04 (Default)
I don't know if it was caused by the very early legacy version of Ubuntu distribution which was uninstalled uncleanly... even though I installed Ubuntu 16.04 via Windows store later. The steps above are simply removal of the "legacy" one. Hope it also works for you.
As mentioned above, using wslconfig is the easiest way to resolve this issue. The error you're running into means the distribution failed to register. wslconfig /u Legacy will unregister the legacy version you have. You can use /s to set the default distribution to your desired one