windows
用 netstat 命令
C:\>netstat -ano | findstr 0.0:80
結果
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 1860
其中 1860 就是佔用 port 的程式 PID,再輸入
C:\>tasklist | findstr 1860
得到如下的資訊
httpd.exe 1860 Services ...