`netstat` command in WSL return empty list

I install python and start python -m SimpleHTTPServer in windows WSL. But the command netstat -an return an empty list. And of course i can't visit the url http://127.0.0.1:8000 in windows browser.

Furthermore, any commands which expose a port like ssh are not working.

Here is my windows version:

  • Windows 10 1703 15063.608

Here is the screenshots:

enter image description here


It is a known issue that netstat does not currently work under WSL.


As OrangeDog link says, the netstat native linux does not work under WSL (v1).

However in the GitHub comments there is a workaround (nice or ugly, I don't know): you can use the netstat.exe instead (I am also surprised that windows executables .exe runs on Linux).

Then in my WSL (v1) I was able to execute something like this:

netstat.exe -an | grep -i "listen" | grep -v "\[::\]" | grep 1616

A solution using the real native Linux executable would certainly be better but in the meantime this workaround does the job.