查看linux中某个端口(port)是否被占用


1.使用lsof

lsof -i:端口号查看某个端口是否被占用

查看linux中某个端口(port)是否被占用_css


2.使用netstat

使用netstat -anp|grep 80

查看linux中某个端口(port)是否被占用_html_02

更多内容,可以点击这里http://www.findme.wang/blog/detail/id/1.html


<link rel="stylesheet" href="http://csdnimg.cn/release/phoenix/production/markdown_views-68a8aad09e.css">
                            <script>
            $(".MathJax").remove();
        </script>
        <script type="text/javascript" src="//static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    </div>

lsof -i tcp:6379

查看端口号为6379的进程

1.使用lsof

lsof -i:端口号查看某个端口是否被占用

查看linux中某个端口(port)是否被占用_css


2.使用netstat

使用netstat -anp|grep 80

查看linux中某个端口(port)是否被占用_html_02

更多内容,可以点击这里http://www.findme.wang/blog/detail/id/1.html


<link rel="stylesheet" href="http://csdnimg.cn/release/phoenix/production/markdown_views-68a8aad09e.css">
                            <script>
            $(".MathJax").remove();
        </script>
        <script type="text/javascript" src="//static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    </div>

lsof -i tcp:6379

查看端口号为6379的进程