Example 1
Detects several port numbers associated with the INFLUXD program.
[email protected] ~ $ sudo netstat -naptu | grep LISTEN | grep influxdtcp6 0 0 :::8083 :::* LISTEN 15668/influxd tcp6 0 0 :::8086 :::* LISTEN 15668/influxd tcp6 0 0 :::8088 :::* LISTEN 15668/influxd
Detects which end numbers are currently open
#实例2
[email protected] ~ $ sudo netstat-tuplnactive Internet connections (only servers) Proto recv-q send-q Local Address Foreign Address State pid/program nametcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 1617/dnsmasq TCP 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1477/m Ysqld TCP6 0 0::: From:::* LISTEN 13576/grafana-serveudp 0 0 0.0.0.0:631 0.0.0.0:* 1050/cups-browsedudp 0 0 0.0.0.0:5353 0.0.0.0:* 2908/chrome UDP 0 0 0.0.0.0:5353 0.0.0.0:* 852/AVAHI-DAEMON:RUDP 0 0 0.0.0.0:46618 0.0.0.0:* 852/ava HI-DAEMON:RUDP 0 0 0.0.0.0:40932 0.0.0.0:* 1617/dnsmasq UDP 0 0 127.0.1.1:53 0.0.0.0:* 1617/dnsmasq UDP 0 0 0.0.0.0:68 0.0.0.0:* 1597/dhclient UDP 0 0 192.168.1.71:123 0.0.0.0:* 2539/ntpd UDP 0 0 127.0.0.1:123 0.0.0.0:* 2539/ntpd UDP 0 0 0.0.0.0:123 0.0.0.0:* 2539/ntpd udp6 0 0::: 42801:: :* 852/AVAHI-DAEMON:RUDP6 0 0:: 5353:::* 2908/chrome UDP6 0 0::: 5353:::* 852/avahi-daemo N:RUDP6 0 0 fe80::1450:2330:2f6:123:::* 2539/ntpd udp6 0 0:: 1:123:::* 2539/ntpd udp6 0 0::: 123:::* 2539/ntpd
Ubuntu 16.04 LTS detects specific port numbers