如何使用linux命令停止套接字?

Ell*_*is 7 sockets

如何在linux中停止套接字:

套接字==>

root@root:/home/aa/test# netstat | grep 3966      
tcp        0      0 server:3966       server:57004       TIME_WAIT  
Run Code Online (Sandbox Code Playgroud)

谢谢

Mit*_*tch 5

尝试这个。只需按键盘上的Ctrl+ Alt+T即可打开终端。当它打开时,运行以下命令:

sudo netstat -ap | grep :<port_number>
Run Code Online (Sandbox Code Playgroud)

您也可以尝试关闭套接字连接

tcpkill -i eth0 host xxx.xxx.xxx.xxx and port yyyy
Run Code Online (Sandbox Code Playgroud)

用 IP 地址替换 X,用端口号替换 Y。

也看看tcpkill刀具命令