linux-端口进程查看

找到使用某个端口的进程

[root@localhost ~]# lsof -i:80         #查看一下80端口的进程
COMMAND  PID   USER   FD   TYPE DEVICE SIZE NODE NAME
httpd   3738   root    3u  IPv6  10791       TCP *:http (LISTEN)
httpd   3793 zhangy    3u  IPv6  10791       TCP *:http (LISTEN)
httpd   3794 zhangy    3u  IPv6  10791       TCP *:http (LISTEN)
httpd   3795 zhangy    3u  IPv6  10791       TCP *:http (LISTEN)
httpd   3796 zhangy    3u  IPv6  10791       TCP *:http (LISTEN)
httpd   3797 zhangy    3u  IPv6  10791       TCP *:http (LISTEN)

[root@localhost ~]# lsof -i udp:53     #查看 一下udp,53端口
COMMAND  PID   USER   FD   TYPE DEVICE SIZE NODE NAME
dnsmasq 3939 nobody    7u  IPv4  11321       UDP 192.168.122.1:domain 

 

上一篇:Linux-部署DHCP服务器


下一篇:4.4ipv6