netstat -tulpn

[root@d java]# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:32000 0.0.0.0:* LISTEN 24282/java
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 12642/php-fpm: mast
tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN 14992/beam.smp
tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN 17109/redis-server
tcp 0 0 10.24.192.192:9200 0.0.0.0:* LISTEN 22711/java
tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN 13460/epmd
tcp 0 0 10.24.192.192:9300 0.0.0.0:* LISTEN 22711/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1472/sshd
tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 14992/beam.smp
tcp6 0 0 :::5672 :::* LISTEN 14992/beam.smp
tcp6 0 0 :::6379 :::* LISTEN 17109/redis-server
tcp6 0 0 :::4369 :::* LISTEN 13460/epmd
udp 0 0 0.0.0.0:51530 0.0.0.0:* 14992/beam.smp
[root@d java]# netstat -h
usage: netstat [-vWeenNcCF] [<Af>] -r netstat {-V|--version|-h|--help}
netstat [-vWnNcaeol] [<Socket> ...]
netstat { [-vWeenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s [-6tuw] } [delay]

-r, --route display routing table
-I, --interfaces=<Iface> display interface table for <Iface>
-i, --interfaces display interface table
-g, --groups display multicast group memberships
-s, --statistics display networking statistics (like SNMP)
-M, --masquerade display masqueraded connections

-v, --verbose be verbose
-W, --wide don't truncate IP addresses
-n, --numeric don't resolve names
--numeric-hosts don't resolve host names
--numeric-ports don't resolve port names
--numeric-users don't resolve user names
-N, --symbolic resolve hardware names
-e, --extend display other/more information
-p, --programs display PID/Program name for sockets
-o, --timers display timers
-c, --continuous continuous listing

-l, --listening display listening server sockets
-a, --all display all sockets (default: connected)
-F, --fib display Forwarding Information Base (default)
-C, --cache display routing cache instead of FIB
-Z, --context display SELinux security context for sockets

<Socket>={-t|--tcp} {-u|--udp} {-U|--udplite} {-S|--sctp} {-w|--raw}
{-x|--unix} --ax25 --ipx --netrom
<AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: inet
List of possible address families (which support routing):
inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25)
netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP)
x25 (CCITT X.25)
[root@d java]#

原文地址:https://www.cnblogs.com/rsapaper/p/9987805.html