I've got the same problem as mentioned here
nc: bind failed: Address already in use
i.e.
$ nc -l 3206
Ncat: bind to :::3206: Address already in use. QUITTING.
Can someone give a 1 line command without pages of explanations, references and alternative methods, on how you free up this port...
nc -l
itself, where the port is in aTIME_WAIT
state. If this is the case you have to wait a short while until the port is released. Check withnetstat -nap | grep :3206
– Chris Davies Feb 11 '17 at 00:01nc
setsSO_REUSEADDR
... – thrig Feb 11 '17 at 00:24nc
on OpenBSD setsSO_REUSEPORT
. This implementation is available on Linux too I think (netcat-openbsd
in Ubuntu). – Kusalananda Feb 11 '17 at 08:01