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 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

  • Might want to patch your system
    – Ramhound
    Sep 13 '17 at 22:36
  • @Ramhound sorry i don't understand :( Should i update my system to insider preview?
    – WalleZhang
    Sep 15 '17 at 1:10
  • No; You are missing the patch that was released on September 12th
    – Ramhound
    Sep 15 '17 at 6:04
  • @Ramhound The update histories show that last installed patch is KB4038788 was released on September 12th. But unfortunately it's still not work. Need I reinstall the WSL?
    – WalleZhang
    Sep 16 '17 at 14:16
  • If you have that patch installed then your build is 15063.608 not 15063.540
    – Ramhound
    Sep 16 '17 at 19:34

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.


Do this:

alias netstat='/mnt/c/Windows/System32/netstat.exe'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.