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: 
I am using Ubuntu 16.04.5 LTS as a Linux subsystem under Windows. My /etc/hosts file under Ubuntu says 

```
#This file is automatically generated by WSL based on the Windows hosts file:
#%WINDIR%\System32\drivers\etc\hosts. Modifications to this file will be overwritten.

```

So I simply changed the `#%WINDIR%\System32\drivers\etc\hosts` instead.
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.