Handy command to kill process listening to port

2011-02-15

This command comes in handy whenever you are busy with (Java EE) development and you quickly want to stop a running a process where you know it opened a particular port:

This example kills JBoss (has a port open for its the naming service on 1099)

lsof -ti TCP:1099 | xargs  kill
This article does not necessarily reflect the technical opinion of EDC4IT, but purely of the writer. If you want to discuss about this content, please use thecontact ussection of the site