linux常用命令-端口探测

博客介绍了Linux系统下端口探测及查询端口运行程序的方法。使用telnet可测试tcp端口连通性,nc能测试tcp和udp端口连通性。查询端口运行程序可使用netstat -anlp | grep xx_port或lsof -i:xx_port等命令。
  1. 端口探测
    telnet和nc 是用来测试端口连通性的一般工具。
    telnet可以测试tcp端口的连通性:
    telnet dstip dstport
    nc可以测试tcp和udp端口的连通性:
    nc -z -v dstip dstport (for tcp)
    nc -z -v dstip dstport (for udp)
  2. 端口运行程序
    netstat -anlp | grep xx_port 或者netstat -anlp | grep xx_prog
    lsof -i:xx_port
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值