OS &linux

netstat
1.find help
netstat -h
2.find all port
netstat -an
3.找端口以及具體的exe文件.
netstat -ab
4.所有執行程式及端口
netstat -abn
5.某個程式使用端口對應的pid,1029為端口號.
netstat -aon|findstr 1029

6.kill掉進程
C:\Documents and Settings\Administrator>netstat -ano|findstr 5152 
TCP    127.0.0.1:5152     0.0.0.0:0        LISTENING       684 
C:\Documents and Settings\Administrator>taskkill /f /pid 684 
成功: 已终止 PID 为 684 的进程。

7.tasklist:进一步查看是哪个程序,可以到任务管理器中看,也可以用命令
可以直接用pid查找程序
tasklist|findstr 4452

參考:http://xiaoxinshome.iteye.com/blog/811078

猜你喜欢

转载自vikingwei.iteye.com/blog/2316566
os