Linux查看监听端口

有2种方法:

netstat

https://www.cnblogs.com/live41/p/14236549.html

lsof -i

https://www.cnblogs.com/live41/p/15481882.html


以上2个命令是通过查询网络堆栈列举正在监听网络的端口。示例:

netstat -anp | grep 3306
netstat -anp | grep ssh

lsof -i | grep 3306
lsof -i | grep ssh

 

posted @ 2021-10-29 18:59  Clotho_Lee  阅读(4435)  评论(0编辑  收藏  举报