beta.blog

Linux: Find Blocked Ports and Kill the Process which blocks it

by 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

1 Comment for this entry

Leave a Reply

*

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!