Error: 0x80070040
Hi, I'm currently receiving this error message while trying to start bash, tried using elevated and normal privilege C:\WINDOWS\system32>bash Error: 0x80070040
At first Bash was working. This is what I changed.
I tried setting the nameserver manually in /etc/resolv.conf, however then I received errors regarding not being able to open a socket when trying to use nslookup. I rm'ed /etc/resolv.conf after this did not work - maybe this is causing the issue I google'd a bit and read a suggestion to set the DNS server on the adapter directly within Windows. So I tried that. I closed bash. Then when I opened it again I started receiving error 0x80070040. Now I've removed the DNS entry for that adapter and set it back to being set dynamically from DHCP. But still I cannot start bash again, I only receive error 0x80070040.
I cannot find an obvious relevant event log relating to this. I've tried disabling the Windows subsystem for linux, rebooting, enabling, rebooting, still getting Error: 0x80070040 I checked in get-appxpackage but don't see anything obviously relating to BASH there. So I don't know how I can reinstall this.
Any suggestions?
Thanks,
Can you try
lxrun.exe /uninstall /full
then
lxrun.exe /install
maybe this can help you
Worked great, thanks!
I was able to reproduce the problem by again rm'ing /etc/resolv.conf (which is a symlink to /run/resolvconf/resolv.conf which is empty ) This again gives me the Error: 0x80070040 So for anyone out there - don't do this :)
Open %USERPROFILE%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\etc\resolv.conf
Add this line
../run/resolvconf/resolv.conf
Very interesting. I got this problem when I was writing a C program, and forgot to close it before compiling -- and I guess it called some invalid code. It crashed my console and the other TTYs with it (my build view in Sublime Text crashed as well).
I had the same issue, edited :
notepad C:\Users\<User>\AppData\Local\Packages\<My_Linux_dir>\LocalState\rootfs\etc\resolv.conf
and added :
resolv.conf.d/head
As in my distro the resolv.conf configuration is in \etc\resolv.conf.d folder, where head was containing the nameserver entries.
@mkhleel @ivalexm I cannot find any linux related folder in the \AppData\Local\Packages
when I search bash, a red colored logo bash on ubuntu on windows appears and it works but doesn't works in cmd when I type bash
I need bash for intellij terminal
C:\Windows\System32\bash.exe {12345678-1234-5678-0123-456789abcdef} ~
Just create a blank text file: %USERPROFILE%\AppData\Local\Packages\%YourLinuxUbuntuOrDebianCodeID%\LocalState\rootfs\etc\resolv.conf
https://github.com/Microsoft/WSL/issues/2980#issuecomment-410943347
I was able to move %USERPROFILE%\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalState\rootfs\etc\resolv.conf to another folder and it started working (i.e. the symbolic link was re-created.)
Hi,
I'm trying to use Ubuntu in Windows using Windows10 WSL feature.
I don't have windows store app in my machine. So, I have downloaded Ubuntu18.04 appx file and extracted the contents. Now, I have Ubuntu18.04.exe to run.
For the first time when I tried to run, it ran successfully. Then for some reason I was trying to uninstall and install it again. The extracted folder to which Ubuntu app is pointing got messed up. So, I have again extracted the files in the same folder. But now when I try to install it again it is throwing me this error.
I tried few online solution where it specified to uninstall Linux using this command:
lxrun /uninstall /full
Even for this I'm getting the same error:
lxrun /uninstall /full
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
This will uninstall Ubuntu on Windows.
This will remove the Ubuntu environment as well as any modifications, new applications, and user data.
Type "y" to continue: y
Uninstalling...
Error: 0x80070002
Can someone please help to resolve this issue?
Thanks in advance
@priyanka2211 See #2980
@onomatopellan, Got it working. I had two versions of Ubuntu, after completely uninstalling it. I was able to run without any error.
Thank you!