Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Linux, netstat -lptun gives a list of servers with the following details:

  • protocol
  • local and foreign address
  • state
  • PID and program name

What is the command's equivalent in FreeBSD?

Thanks.

share|improve this question
1  
If you wish to transplant the GNU netstat into BSD, you will probably need to compile it from source. –  harrymc Apr 29 '13 at 7:27

2 Answers 2

up vote 4 down vote accepted
+50

The command you want is sockstat. Use sockstat -4l to see just IPv4 listening sockets

share|improve this answer
    
this is exactly what i was looking for... thanks heaps –  Howard May 1 '13 at 4:26

netBSD also have netstat program alongside their repository since netBSD 2.0, if on your machine doesn't have, you can install it, so you can use netstat on netBSD. here the guide http://modman.unixdev.net/?sektion=1&page=netstat&manpath=NetBSD-2.0

share|improve this answer
    
Thank you, but BSD netstat is different from GNU netstat. –  Howard Apr 26 '13 at 10:38

Your Answer

 
discard

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.