How to check what version of netcat am I running

netcatversion

netcat doesn't support --version or --license flag, running strings against the binary doesn't mention version number or anything of that kind. How can I reliably check what does version (openbsd/gnu + version number) does a particular nc binary implement?

Best Answer

For Debian, Ubuntu, and Mint:

netcat -h
nc -h

For Fedora, Red Hat Enterprise Linux, and CentOS:

ncat -h

The first line of those commands will give the version.

Related Question