# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 916/pure-ftpd (SERV
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 937/sshd: /usr/sbin
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 613722/sshd: root@p
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 121520/php
tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 2396/sendmail: MTA:
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 747/systemd-resolve
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2396/sendmail: MTA:
tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN 88788/nginx: master
# netstat -nlup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 127.0.0.1:323 0.0.0.0:* 1028/chronyd
udp 0 0 127.0.0.53:53 0.0.0.0:* 747/systemd-resolve
udp 0 0 172.26.79.92:68 0.0.0.0:* 745/systemd-network
udp6 0 0 ::1:323 :::* 1028/chronyd
Linux查看监听的TCP和UDP端口
最新推荐文章于 2024-02-23 10:56:33 发布