Question: 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 ?

Answer: 
Your issue is adressed here:
<https://github.com/Microsoft/BashOnWindows/issues/398>

To prevent WSL from automatically generating the /etc/hosts file on every bash startup, you need to remove the following comment line in /etc/hosts:

```
# This file was automatically generated by WSL. To prevent automatic generation of this file, remove this line.

```
I had to do `chattr +i` on the file because the file kept getting overwritten even after I followed the instructions to add those two lines to `/etc/wsl.conf`.

NOTE - remember that you ll need `chattr -i` to be able to edit the file from anywhere again.