Port is open or closed on UNIX? - Stack Overflow

Port is open or closed on UNIX? - Stack Overflow

Wednesday, August 05, 2015

2:23 PM

Try (maybe as root)

lsof -i -P

and grep the output for the port you are looking for.

For example to check for port 80 do

lsof -i -P | grep :80

Inserted from <http://stackoverflow.com/questions/6139309/how-to-check-whether-particular-port-is-open-or-closed-on-unix>

Created with Microsoft OneNote 2016.


Port is open or closed on UNIX? - Stack Overflow

Port is open or closed on UNIX? - Stack Overflow

Wednesday, August 05, 2015

2:23 PM

Try (maybe as root)

lsof -i -P

and grep the output for the port you are looking for.

For example to check for port 80 do

lsof -i -P | grep :80

Inserted from <http://stackoverflow.com/questions/6139309/how-to-check-whether-particular-port-is-open-or-closed-on-unix>

Created with Microsoft OneNote 2013.