I can't kill a port process
Matthew Martinez
I'm doing in Ubuntu 12
alex@ubuntu:~/folder$ lsof -t -i:3000
4469
alex@ubuntu:~/folder$ kill 4469
alex@ubuntu:~/folder$ lsof -t -i:3000
4469What did I do wrong?
23 Answers
kill -9 4469 or
fuser -k -n tcp 30003000 is the port number
or Use killport command :
wget
killport 3000 I know this is old, but I found this useful to me as well. Combining the lsof command from your question and the kill-9 from Abdennour TOUMI's answer into a much simpler and quicker one-line command would give the following:
kill -9 `lsof -t i:3000`Inside of the two bactick (`) keys, you have the lsof -t i:3000 command from before, which gets the process on the port 3000. Then, the kill -9 command kills that process.
Use this command. Replace 8000 with any other port that you want to free up.
sudo fuser -k 8000/tcp