How to find out what process a listening socket is bound to under Solaris 8

networkingsolaris

On a Solaris 8 server, how do I find out what process is listening on a given port? The Windows implementation of 'netstat' offers the -o and -b switches, which show the owning process ID and name respectively. Is there an equivalent under Solaris?

Best Answer

lsof -i

Doesn't come installed by default, but you can get Solaris version from http://www.sunfreeware.com/