Netcat Tools – Differences Between ncat, nc, and netcat

.nccentosnetcat

I'm not sure about when to use nc, netcat or ncat.
If one is the deprecated version of another?
If one is only available on one distribution?
If it is the same command but with different names?

In fact I'm a bit confused. My question comes from wanting to do a network speed test between two CentOS 7 servers. I came across several examples using nc and dd but not many using netcat or ncat.

Could someone clarify this for me please?

Best Answer

nc and netcat are two names for the same program (typically, one will be a symlink to the other). Though—for plenty of confusion—there are two different implementations of Netcat ("traditional" and "OpenBSD"), and they take different options and have different features.

Ncat is the same idea, but from the Nmap project. There is also socat, which is a similar idea. There is also /dev/tcp, an (optional) Bash feature.

However, if you're looking to do network speed tests then all of the above are the wrong answer. You're looking for iperf3 (site 1 or site 2 or code).

Related Question