Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run netstat -n on Solaris I get different results from netstat -n on Linux, even though according to the manual pages in Solaris and Linux the -n flag should do the same thing.

My question:

Please advise me how to run netstat in Linux so that I will get the same results as I get in Solaris.



 netstat -n | head-10

LocalAddress       RemoteAddress   SwindSend-QRwindRecv-Q   State
 -------------------------------------------------------------------------  5888     049640     0CLOSE_WAIT   49152     049152     0ESTABLISHED  49152     049152     0ESTABLISHED 63702     049232     0ESTABLISHED      49152     049152     0ESTABLISHED  5888     049220     0CLOSE_WAIT


 netstat -n | head -10
 Active Internet connections (w/o servers)
 Proto Recv-Q Send-Q Local Address               Foreign Address             State      
 tcp        0      0                ESTABLISHED 
 tcp        0      0         ESTABLISHED 
 tcp        0      0         ESTABLISHED 
 tcp        0      0         ESTABLISHED 
 tcp        0      0         ESTABLISHED 
 tcp        0      0         ESTABLISHED 
 tcp        0      0        ESTABLISHED 
 tcp        0      0                ESTABLISHED
share|improve this question
When I run netstat -n on the two systems, the -n flag behaves in the same way, although the two programs format their outputs a little differently. Can you explain a little about how you want the Linux output to look and why you want it that way? – asciiphil Dec 26 '13 at 14:51
please see my update question – Eytan Dec 26 '13 at 17:13
Pasting isn't the same as explaining. We see your 2 examples, now what's the goal? You need the Rwind/Swind information? Just reorder the columns? Or for some unholy reason you need byte-for-byte mimicry? – Wumpus Q. Wumbley Dec 26 '13 at 20:46
@Eytan Why aren't you explaining what precisely you expect and why, as already asked by Wumpus ? You accepted an answer that suggests a undoable solution. – jlliagre Dec 31 '13 at 8:08
up vote 3 down vote accepted

Linux's netstat is from GNU's net tools, Solaris's isn't (Windows has its own too, so do the BSD's). You can install GNU on Solaris if you want GNU behavior.

share|improve this answer

Linux netstat comes from net-tools which is not part of the GNU tools although licensed under the GPL.

Solaris netstat originally comes from SVR4 netstat.

Like most administrative commands, netstat is not standardized by POSIX so there is a large variation between the various implementations supported options and their output.

net-tools netstat is then Linux specific so there is no way to install it on Solaris.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.