Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
$  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
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


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.