14
I need to free up port 8000 but something is already using it. How can I find what process is using it and kill it?
Loading...
Q&A · Answered
I need to free up port 8000 but something is already using it. How can I find what process is using it and kill it?
Accepted answer
# Using lsof
sudo lsof -i :8000
# Using netstat
sudo netstat -tlnp | grep :8000
# Using ss
sudo ss -tlnp | grep :8000
# Kill by PID
kill -9 PID_NUMBER
# Kill all processes on port (one-liner)
sudo fuser -k 8000/tcpSay what you tried, not only what worked — the next person needs the reasoning. Code goes in a fenced block.