I had problems with hostnames resolving in windows Linux-subsystem so I removed /etc/hosts and wrote new version of it. That solution solved my problem, but after every reboot system started overriding /etc/hosts by a some default version, so I need setup hosts again and again.
Is it possible to setup linux subsystem so it copies original windows hosts file or at least doesn't delete already written file ?
Linux overrides /etc/hosts on windows-linux-subsystem
linuxwindows-subsystem-for-linux
Best Answer
Add the following two lines:
Reference: https://devblogs.microsoft.com/commandline/automatically-configuring-wsl/