linux:

1.根据端口号查询进程

 netstat -tunlp|grep port
根据端口号查询来源程序

 

2.根据进程查询来源程序
ps aux | grep pid
上图看出所属进程为2281
根据端口号查询来源程序

上图看出占用8083端口的程序为ngnix

 

windows:

比如查8099的端口

查看进程名,路径,pid 再配合使用find或findstr就可以查到pid对应的路径了
wmic process get name,executablepath,processid|findstr pid

根据端口号查询来源程序

 

 

netstat -ano|findstr 8099

 

wmic process get name,executablepath,processid|findstr 3344

 

 

相关文章: