The Missing Bit

How to kill a TCP socket under linux
2022-02-21

linux

To test the behavior of a web socket client writter in elixir, I was wondering how to force close a socket.

The solution is quite simple and reside in the ss command:

sudo ss -K dst 1.1.1.1 dport = 1234

where the ip and port can be adjusted.

If you wish to comment or discuss this post, just mention me on Bluesky or