Showing results for 
Search instead for 
Do you mean 

release the port

SOLVED
Go to Solution
Frequent Advisor

release the port

I have a system port ( port no. 5000 ) is locked by application ( but i don't know which application is locking it ), can advise if I want release the port , what can i do ? or how can I check which application / PID is locking it ? thx

netstat -na |grep 5000
5 REPLIES
Honored Contributor Honored Contributor

Re: release the port

Haeman,

Perhaps you could use the lsof tool if you have it or you could use this command to get more information on it netstat -a | grep Port_number

Regards,

Jaime.
Work hard when the need comes out.
Frequent Advisor

Re: release the port

the netstat can't show the pid , how can i know the pid ? thx
Honored Contributor Honored Contributor

Re: release the port

The lsof utility would be a great thing to have here.

If it's a TCP port, running "lsof -i tcp:5000" would tell you the PID of the process holding it. If it's a UDP port, "lsof -i udp:5000" would do the same thing.

MK
MK
Highlighted

Re: release the port

Hi

Have you tried /usr/local/bin/lsof ???

- Vivek
Frequent Advisor

Re: release the port

yes , it works , thx.