linux/window 端口号,进程命令行

来源:互联网 发布:加油卡充值软件 编辑:程序博客网 时间:2024/05/24 22:42

linux

1:查看所有端口号 

netstat -antu
a表示查看所有状态的端口搜索,默认只看连接的
n表示显示数字端口号,而不显示名称 ex:8080 not tomcat
t表示
tcp端口
u表示udp端口
2:根据端口号查看进程
netstat -apn|grep port
lsof -i:port
windows
netstat -ano | findstr "端口号"
tasklist | findstr "PID号"
原创粉丝点击