Linux和Windows端口占用情况查看

Linux :netstat 

-t tcp三次握手

-u udp直传数据

-l 监听

-r 路由

-n 显示ip端口号

-p 进程

一般的我们使用 netstat -tnpl | grep xxx 配合管道符来查找

[root@VM_48_173_centos conf]# netstat -tnpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd           
tcp        0      0 127.0.0.1:6800          0.0.0.0:*               LISTEN      3569/java           
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      2856/nginx: master  
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      2856/nginx: master  
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1015/sshd           
tcp        0      0 127.0.0.1:8087          0.0.0.0:*               LISTEN      30812/sshd: root@pt 
tcp        0      0 127.0.0.1:6600          0.0.0.0:*               LISTEN      3523/java           
tcp        0      0 0.0.0.0:3690            0.0.0.0:*               LISTEN      26445/svnserve      
tcp6       0      0 :::111                  :::*                    LISTEN      32611/rpcbind       
tcp6       0      0 :::80                   :::*                    LISTEN      2856/nginx: master  
tcp6       0      0 :::8088                 :::*                    LISTEN      3569/java       

Windows :netstat

通常使用netstat -aon | findstr ‘xxxx’ 注意单引号

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值