Linux: Find Blocked Ports and Kill the Process which blocks it
by admin on May.24, 2012, under Linux (Ubuntu)
In order to find out which application blocks a specific port you’d have to execute the following command in your terminal in order to get a listing:
netstat -anp|grep :3389[[:blank:]]
Where 3389 is the port I’m looking for. The command will return an output similar to this one:
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 7552/qemu
Where 7552 is the process ID (PID) of the application which blocks the port. Now just go ahead and kill this process (in my case it’s qemu) in order to free the TCP port:
kill -9 7552
August 26th, 2014 on 05:09
Thanks. It helped me.