From LQWiki
(Redirected from Killing sockets)
You can kill a socket with netstat.
First, find the socket you are interested in killing:
netstat -avp
"a" for "all," "v" for "verbose," and then "p" for "process" (show process #). For example, you could find a line
tcp 0 0 *:www *:* LISTEN 6670/apache2
This means that the process with the id 6670 listens on the www-port.
cat /etc/services | grep
tells you that the www-port is port 80:
www 80/tcp http # WorldWideWeb HTTP
Then kill the respective process:
kill -9 6670

This page is available under a