-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 0x80070490 after modifying /etc/hosts from Windows #735
Comments
Modifying files inside of %localappdata%\lxss from Windows is not supported. We store the Linux uid, gid, mode, etc in an extended attribute of the file and many editors stomp over this information when they save files. To recover I would delete %localappdata%\lxss\rootfs\etc\hosts from Windows, relaunch bash.exe, and edit /etc/hosts using vi or nano inside of the bash Window. |
I ran to similar issue, when creating a symlinked /etc/hosts file from bash.
After that I have to manually delete Windows build 14393.51 |
@oujesky Yeah I did the exact same thing and got the exact same results, which led me to this. It's not a deal-breaker (I mean, it's Ubuntu on Windows, let's be thankful), but sorely disappointing to have to update two hosts files on my workstation multiple times a day. |
Any updates on this? I got same problem after symlinking, and I think it would be nice to have one hosts file on machine |
+1, I also thought I was clever trying to do that, and it works great in existing bash, but starting a new bash doesn't work. Sounds to me like just a simple bug in the bash launching procedure... |
Just run bash as an administrator: WindowsKey+Q, type cmd in search box, right click > Run as administrator > bash |
@mdragosGit and then you have a bash with full privileges to f*ck up your computer, I believe that this is not a good thing. |
@CherryDT, you don't have to run run WSL as administrator. Give your Windows login account write permission on Maybe someday they will give WSL a UAC prompt and this will no longer be necessary. |
When I edit
/etc/hosts
from Windows with Notepad++ (the edited file isc:\Users\Martin\AppData\Local\lxss\rootfs\etc\hosts
) the bash won't start again (I added one new line).The text was updated successfully, but these errors were encountered: