Skip to content
Home » How to kill a app at Specific port

How to kill a app at Specific port

Let’s start the discussion about How to kill a app at Specific port in following methods.

Killing an app at a specific port is similar to killing the process running on a specific port. Initially, you need to list all the running processes / apps on a port use the below commands to get started.

To list any process listening to the port 5000 use:

lsof -i:5000

To kill any process listening to the port 5000 use:

kill $(lsof -t -i:5000)
or
kill -9 $(lsof -t -i:5000)

I hope the strategies listed above work for you. Happy coding and come back again.

Similar Post : How to stop postgres in linux