Take the 2-minute tour ×
$  netstat -ltanp tcp | grep 8000 | grep LISTEN
tcp4       0      0  *.8000                 *.*                    LISTEN

I want to release this port When I do

$ lsof -i:8000

I get nothing

I even restarted the machine, nothing helps

Please let me know how can I release this port

Thank you

share|improve this question
Did you run these commands with root privileges? –  Ladadadada Sep 24 '12 at 23:27
That was missing :) –  learner Sep 24 '12 at 23:53

1 Answer 1

up vote 1 down vote accepted

Moving my comment to an answer:

Did you run these commands with root privileges?

Both the -p option to netstat and the -i option to lsof require root privileges to do anything meaningful. netstat will output an error about your euid not being root but it's easy to miss it as it scrolls off the top of the screen. It will use a dash instead of the PID in the relevant column.

Once you know which PID is listening on that port you can shut it down. Since restarting didn't help, whatever it is must also be configured to start up on boot. You will probably also want to stop that happening.

share|improve this answer

Your Answer


