平時用得少,作個備忘。
windows:
netstat -ano | findstr "端口号"
複制
得到程序pid
tasklist | findstr "pid号"
複制
就能找到具體程序了。
linux:
檢視端口被哪些程序監聽
lsof -i :端口号
複制
檢視具體占用的程序
netstat -tunlp|grep 端口号
複制