Hacker News new | ask | show | jobs
by naikrovek 2041 days ago
In WSL 2 the nameserver is the Windows host OS. That's how you get the IP of the host if that's what you're talking about.

    export WINHOST=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')
Because the Linux VM in WSL 2 is a "different" computer, mostly, according to Windows, there may be firewall trouble, I suppose.
1 comments

Windows itself is a different computer, because Hyper-V is a type 1 hypervisor.