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.

I used netstat and I see some ports open that I want closed. How do I close them?

The computer is a Mac running OS X

share|improve this question

migrated from stackoverflow.com Jul 24 '10 at 7:46

This question came from our site for professional and enthusiast programmers.

1  
you should ask this question in superuser –  fardjad Jul 24 '10 at 6:29
    
netstat -lp will give you process/port –  unknown Jul 24 '10 at 6:36
    
... did not work ... Mac OSX *** –  Xofo Jul 24 '10 at 7:02
1  
add comment

1 Answer

Try using

lsof | grep portnumber

to get the process that has it opened.

You could also use the -i option to let lsof do the filtering for a TCP port

lsof -i TCP:portnumber

share|improve this answer
add comment

Your Answer

 
discard

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