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: 
```bsh
sudo vim /etc/wsl.conf

```

Add the following two lines:

```bsh
[network]
generateHosts = False

```

Reference: <https://devblogs.microsoft.com/commandline/automatically-configuring-wsl/>
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.