如何在Linux中查找进程ID打开的端口? [英] How to find ports opened by process ID in Linux?
本文介绍了如何在Linux中查找进程ID打开的端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设进程的PID已知
推荐答案
netstat --all --program | grep '3265'
--all
显示监听和非监听套接字.--program
显示socket所属程序的PID和名称.--all
show listening and non-listening sockets.--program
show the PID and name of the program to which socket belongs.
您也可以使用端口扫描器,例如 Nmap.
You could also use a port scanner such as Nmap.
这篇关于如何在Linux中查找进程ID打开的端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文