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.
The manual pages
- Solnix: netstat(8) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: netstat(8) net-tools-2.10
- FreeBSD: netstat(1) 15.1-RELEASE
- OpenBSD: netstat(1) 8.0
- NetBSD: netstat(1) 11.0
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 with | Topic | What differs |
|---|---|---|
| all four | -p meaning | Solnix 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 meaning | Solnix -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 |
| Linux | processes 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 meaning | Solnix -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, NetBSD | interval reporting | Solnix 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 |
| Linux | continuous output and listeners | Linux -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 meaning | Solnix -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 meaning | Solnix -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 meaning | Solnix -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 meaning | Solnix -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-specific | Solnix -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 |
| Linux | status of the command | The 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
| Task | Solnix | Linux | FreeBSD | OpenBSD | NetBSD |
|---|---|---|---|---|---|
| show all sockets including listeners | netstat -a | netstat -a | netstat -a | netstat -a | netstat -a |
| show only listening sockets | — | netstat -l | — | netstat -l | — |
| show routing table, numeric | netstat -rn | netstat -rn | netstat -rn | netstat -rn | netstat -rn |
| show interface state | netstat -i | netstat -i | netstat -i | netstat -i | netstat -i |
| show per-protocol statistics | netstat -s | netstat -s | netstat -s | netstat -s | netstat -s |
| show process owning each socket | netstat -u | netstat -p | — | — | — |
| restrict to one protocol | netstat -P tcp | netstat --tcp | netstat -p protocol | netstat -p protocol | netstat -p protocol |
Standards
- POSIX: netstat is not a POSIX.1-2024 utility.
Writing portable scripts
- Do not assume
-p,-P,-uor-Mmean the same thing across systems. Use only-a,-n,-r,-iand-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.