Kill process by used port Ubuntu
Kill process by used port Ubuntu
Using fuser
The best way to kill a port is
fuser -k 8080/tcp
Using kill
Find what application/process is using the port:
sudo netstat -lpn |grep :8080
You will get an output similar to this one
tcp6 0 0 :::8080 :::* LISTEN 21994/java
You got the process Id, which is 21994
, now this is the process that is using port 8080
Kill the process
kill 21994