PHP程序员必知netstat -tunlp命令说明

      发布在:后端技术      评论:0 条评论
<p>netstat -tunlp显示<span style="color: rgb(77, 77, 77); font-family: &quot;Microsoft YaHei&quot;, &quot;SF Pro Display&quot;, Roboto, Noto, Arial, &quot;PingFang SC&quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">tcp和udp正在监听的端口<span style="color: rgb(77, 77, 77); font-family: &quot;Microsoft YaHei&quot;, &quot;SF Pro Display&quot;, Roboto, Noto, Arial, &quot;PingFang SC&quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">进程</span></span></p><p><span style="color: rgb(77, 77, 77); font-family: &quot;Microsoft YaHei&quot;, &quot;SF Pro Display&quot;, Roboto, Noto, Arial, &quot;PingFang SC&quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><img src="http://img.80zx.com/ueditor/image/202007/1595836189431882.jpg" title="未标题-1" alt="未标题-1"/></span></p><p></p><p>三、netstat常见参数</p><p>-a (all) 显示所有选项,默认不显示LISTEN相关。</p><p>-t (tcp) 仅显示tcp相关选项。</p><p>-u (udp) 仅显示udp相关选项。</p><p>-n 拒绝显示别名,能显示数字的全部转化成数字。</p><p>-l 仅列出有在 Listen (监听) 的服务状态。</p><p><br/></p><p>-p 显示建立相关链接的程序名</p><p>-r 显示路由信息,路由表</p><p>-e 显示扩展信息,例如uid等</p><p>-s 按各个协议进行统计</p><p>-c 每隔一个固定时间,执行该netstat命令。</p><p><br/></p><p>LISTEN和LISTENING的状态只有用-a或者-l才能看到。</p><p>参考:<a href="https://blog.csdn.net/dongl890426/article/details/86981901">https://blog.csdn.net/dongl890426/article/details/86981901</a></p><p><br/></p><p><span style="color: rgb(77, 77, 77); font-family: &quot;Microsoft YaHei&quot;, &quot;SF Pro Display&quot;, Roboto, Noto, Arial, &quot;PingFang SC&quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><br/></span></p>
热门推荐