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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM