Windows方法
TCP
netstat -aon|findstr "TCP"|findstr "LISTENING"|findstr ":135[^0123456789]"
UDP
netstat -aon|findstr "UDP"|findstr ":5353[^0123456789]"
最后面的数字为PID
接下来只要在tasklist里找PID一样的程序就行了
tasklist|findstr
Linux方法
lsof -i -P -n|grep -v ESTABLISHED
查找监听特定端口的进程
本文介绍在Windows和Linux环境下如何使用命令行工具找出正在监听特定端口的进程及其PID,包括使用netstat和lsof命令的具体方法。

被折叠的 条评论
为什么被折叠?



