kruo3a
Last Updated: February 25, 2016
·
633
· zohebsait
1ffc0aa64a40846eb10f2e11a7239b08

Kill process listening on a TCP port

Here's a tiny shell script I use to quickly kill of whatever process is hogging a TCP port.

$ cat portkill.sh
#!/bin/sh
lsof -i :$1 | awk '{print $2}' | tail -n 1 | xargs kill -9

Usage:
# kills process on port 8000
$ ./portkill.sh 8000

Say Thanks
Respond

1 Response
Add your response

9586
0 nfyu8tfozjwkn61qn8sp8gfovgypn tq9he18gxteze wf5n43u8aci7u1puckp4vxyt75t641er

very handy!
can we get something like this for windows, and runs without admin rights?

over 1 year ago ·