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
netstat -lp
This question came from our site for professional and enthusiast programmers.
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
-i
lsof
lsof -i TCP:portnumber
This is a collaboratively edited question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
Got a question about the site itself? meta is the place to talk about things like what questions are appropriate, what tags we should use, etc.
about » faq » meta »
tagged
asked
1 year ago
viewed
2,596 times
active
netstat -lpwill give you process/port – unknown Jul 24 '10 at 6:36