Linux 下找出使用个别埠号的 process


在 Linux 下要找出使用了个别埠号的 process, 可以透过 netstat 实现, 例如:

netstat -tulpn | grep :80

输出会类似以下
tcp 0 0 :::80 :::* LISTEN 3116/httpd

其中最后一栏 3116/httpd 内, 3116 代表服务的 pid, httpd 是名称

Tags:

Leave a Reply