Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am looking for a way to list all the active VNC connection to a machine. I know I can get all the active connection of the machine by running netstat -na but I don't know how to filter just the connection for the VNC server. I am running OSX 10.8.3 , any hint?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

VNC runs on port 5900 by default, so you should be able to do:

netstat -na | grep '[:.]5900'

(OS X uses . as a port delimiter, but on Linux it's : — the pattern above will match both)

Example on my OS X machine:

% netstat -na | grep '[:.]5900'
tcp4       0      0  *.5900                 *.*                    LISTEN     
tcp6       0      0  *.5900                 *.*                    LISTEN 
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.