Kurt Peek Kurt Peek - 1 year ago 140
Linux Question

How to determine which process is using a port in Linux

I'm currently running RethinkDB on its default port, because if I point my browser to

I see the RethinkDB web interface:

enter image description here

I'd like to close RethinkDB and re-open it on another port using the
argument. However, so far I haven't been able to close it from within Python using the

Instead, I'd like to try a brute-force approach by simply killing the process using that port. I tried to determine which process that is by using
, but that doesn't bring up any results:

kurt@kurt-ThinkPad:~$ netstat -a | grep 8080

How can I kill the RethinkDB process to make the port available again?

Answer Source
1.  lsof -i:8080
2.  kill $(lsof -t -i:8080)
2 . kill -9 $(lsof -t -i:8080)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download