This small gist will add automaticaly wsl.host to hosts file and you will be able to communicate with your windows system, using wsl.host as address.
After creating your wsl do next:
- Place
startup.shat/startup.shand runchmod +x /startup.sh - Run
visudo - Add
%sudo ALL=NOPASSWD: /startup.shto end of file - Add
sudo /startup.shat end of file/etc/profile
That's all. After first login in wsl after system start wsl.host will point to your windows host
Inspired by https://gist.github.com/irazasyed/a7b0a079e7727a4315b9
It is not working on my WSL, until manual launch sh-script.