Quantcast
Channel: Admins Goodies » port
Viewing all articles
Browse latest Browse all 10

Mountain Lion, How can I release port?

$
0
0

Question

$  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

Asked by learner

Answer

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.

Answered by Ladadadada

Viewing all articles
Browse latest Browse all 10

Trending Articles