Hosts file is not inherit on bash
Maybe this is more a feature than a bug, but the hosts file in Windows should be linked to one in linux
ln -sf /mnt/c/WINDOWS/System32/Drivers/etc/hosts /etc/hosts?
Interesting idea. At this point we have deliberately not tried to keep WSL in sync with Windows files simply due to the confusion on if one or the other changes. This is something we should revisit in the future.
I would suggest putting this in User Voice.
Closing for now. Please add to https://aka.ms/winbashuv if you would like us to revisit.
I'd like to keep this one open. I plan on looking at this soon.
Hello, how's it going? I know that I can link hosts file by myself, but I think, it should be added by default
Any news on this? I can link the file and open it but it is read only. "/etc/hosts" [readonly][dos] 139L, 4077C. Is there another work around?
/etc/hosts now inherits from the Windows hosts file since Insider build 16184. But, this change is currently only available on Windows Insider build, but, will also be available on Fall Creators Update.
I just tested the feature in the Insider build and works well. Thanks very much for this feature!
Found this: https://github.com/shayne/go-wsl2-host