netstat(8) on Solnix vs Linux and the BSDs

On a default Solnix system netstat is the illumos netstat at /usr/bin/netstat. It uses different flags from Linux and the BSDs for the same jobs: -p shows the net-to-media (ARP) table, -u lists processes per socket, and -P selects a protocol. Interval reporting uses a trailing [interval [count]] argument, not -w.

What Solnix runs

A default Solnix system runs the illumos netstat at /usr/bin/netstat. /usr/ucb/netstat is also shipped, but the bundle does not describe it. The page text in the bundle is trimmed, so the DISPLAYS section and the end of the -R description are not available.

Differences

Compared withTopicWhat differs
all four-p meaningSolnix netstat -p shows the net-to-media tables. Linux -p shows the PID and program name per socket. FreeBSD, OpenBSD and NetBSD -p takes a protocol argument to filter by protocol. Solnix uses -P for that.
Source: Solnix netstat(8) -p, -P; Linux netstat(8) --program; FreeBSD netstat(1) -p protocol; OpenBSD netstat(1) -p protocol; NetBSD netstat(1) -p protocol
FreeBSD, OpenBSD, NetBSD-P meaningSolnix -P protocol limits the display to one protocol (ip, ipv6, icmp, icmpv6, igmp, udp, tcp, rawip), lower-case only. On FreeBSD -P displays the log ID per socket. OpenBSD and NetBSD -P pcbaddr dumps a protocol control block.
Source: Solnix netstat(8) -P; FreeBSD netstat(1) -P; OpenBSD netstat(1) -P pcbaddr; NetBSD netstat(1) -P pcbaddr
Linuxprocesses per socket (-u, -p)Solnix -u lists the user name, PID and program of each process holding the endpoint; with -v it also shows the process arguments. On Linux -u means UDP sockets, and the PID/program list comes from -p.
Source: Solnix netstat(8) -u, -v; Linux netstat(8) --udp, --program
OpenBSD-u meaningSolnix -u shows processes that have each socket open. OpenBSD -u limits statistics or PCB reports to the AF_UNIX family.
Source: Solnix netstat(8) -u; OpenBSD netstat(1) -u
FreeBSD, OpenBSD, NetBSDinterval reportingSolnix takes a trailing [interval [count]] argument with -s, -m and -i, and -T u|d adds a time stamp. FreeBSD, OpenBSD and NetBSD use -w wait for per-interface traffic, and OpenBSD adds -c count.
Source: Solnix netstat(8) SYNOPSIS, -T; FreeBSD netstat(1) -w wait; OpenBSD netstat(1) -w, -c count; NetBSD netstat(1) -w wait
Linuxcontinuous output and listenersLinux -c reprints the output every second. Solnix -c selects CIDR notation for IPv4 networks with -i, -r and -M. Linux -l shows only listeners; the Solnix text has no -l, and -a adds listeners to the display.
Source: Solnix netstat(8) -c, -a; Linux netstat(8) --continuous, --listening
all four-f meaningSolnix -f takes inet, inet6 or unix, and with -r also keyword:value route filters (af, outif, dst, flags). Linux uses -A/--protocol and -4/-6/-x for families. FreeBSD -f takes a protocol family, and -4/-6 limit to IPv4 or IPv6. OpenBSD and NetBSD -f lists more families (mpls; NetBSD also arp, ns, atalk).
Source: Solnix netstat(8) -f address_family, -f filter; Linux netstat(8) --protocol; FreeBSD netstat(1) -f, -4, -6; OpenBSD netstat(1) -f; NetBSD netstat(1) -f
FreeBSD, OpenBSD, NetBSD-m meaningSolnix -m shows STREAMS memory statistics. FreeBSD, OpenBSD and NetBSD -m show statistics of the mbuf or network memory buffer pool.
Source: Solnix netstat(8) -m, DESCRIPTION; OpenBSD netstat(1) -m; NetBSD netstat(1) -m
all four-M meaningSolnix -M shows the multicast routing table (with -s, its statistics). Linux -M lists masqueraded connections. FreeBSD, OpenBSD and NetBSD -M core reads kernel values from a core file; they show multicast routing with -g.
Source: Solnix netstat(8) -M; Linux netstat(8) --masquerade; OpenBSD netstat(1) -M core, -g; NetBSD netstat(1) -M core, -g
all four-g meaningSolnix -g shows multicast group memberships for all interfaces, with source-specific detail under -v. Linux -g shows multicast group membership. OpenBSD and NetBSD -g show multicast routing tables, not group memberships.
Source: Solnix netstat(8) -g; Linux netstat(8) --groups; OpenBSD netstat(1) -g; NetBSD netstat(1) -g
all four-D and -R are Solnix-specificSolnix -D shows DHCP status of configured interfaces. Solnix -R shows extended security attributes and works only with Solaris Trusted Extensions. FreeBSD -R shows flowid/flowtype, and OpenBSD -R lists rdomains.
Source: Solnix netstat(8) -D, -R; FreeBSD netstat(1) -R; OpenBSD netstat(1) -R
Linuxstatus of the commandThe Linux page says netstat is mostly obsolete and names ss, ip route, ip -s link and ip maddr as replacements. The Solnix page carries no such note.
Source: Linux netstat(8) NOTES; Solnix netstat(8) DESCRIPTION

Everyday tasks

TaskSolnixLinuxFreeBSDOpenBSDNetBSD
show all sockets including listenersnetstat -anetstat -anetstat -anetstat -anetstat -a
show only listening sockets—netstat -l—netstat -l—
show routing table, numericnetstat -rnnetstat -rnnetstat -rnnetstat -rnnetstat -rn
show interface statenetstat -inetstat -inetstat -inetstat -inetstat -i
show per-protocol statisticsnetstat -snetstat -snetstat -snetstat -snetstat -s
show process owning each socketnetstat -unetstat -p———
restrict to one protocolnetstat -P tcpnetstat --tcpnetstat -p protocolnetstat -p protocolnetstat -p protocol

Standards

  • POSIX: netstat is not a POSIX.1-2024 utility.

Writing portable scripts

  • Do not assume -p, -P, -u or -M mean the same thing across systems. Use only -a, -n, -r, -i and -s, which have the same broad meaning in every page, and test the output format on each system.
  • Parse netstat output only per system, or use the tools the pages name: ss and ip on Linux.

Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.