Let’s start the discussion about How to kill Specific process on port in following methods.
To list any process listening to the port 8000 run :
lsof -i:8000
To kill any process listening to the port 8000:
kill $(lsof -t -i:8000)
SIGKILL – terminate immediately/hard kill signal corresponds to -9: see List of Kill Signals and What does the -9 option in the kill command do? If no signal is given to kill, the TERM signal, often known as -15 or soft kill, is sent, which is sometimes insufficient to terminate a process.. Run :
kill -9 $(lsof -t -i:8000)
I hope the strategies listed above work for you. Happy coding and come back again.
Similar Post : How to kill a app at Specific port