Thursday, 21 July 2011

How to kill the process running on specific port in Linux

I would like to stop the process which is running on port 8080 in a Linux server, but I don't know the process that owns it.






'lsof -w -n -i tcp:8080'


or


'fuser -n tcp 8080'


or


'netstat -anp | grep :8080[[:blank:]]'






should show you the process ID.






If there is no (init) script to use to shut down the offending service (since TCP/8080 means proxy) to kill you can by PID 'kill -9 pidnumber'.

No comments:

Post a Comment