Which netcat should I install from the official repos?

Hello. I’d like to install netcat. There are two versions in the official repos:

 pacman -sS netcat
extra/gnu-netcat 0.7.1-8
    GNU rewrite of netcat, the network piping application
community/openbsd-netcat 1.217_2-1
    TCP/IP swiss army knife. OpenBSD variant.

Which one should I pick? I’m a bit surprised to see a BSD utility in the repo. I tend to go for the highest version number, and assume older alternates are just for backwards compatibility. Is there something else going on here?

Unless you have older shell scripts that rely on the workings of the *BSD variant of netcat I think it’s safe to go for the (newer) GNU rewrite of it…

…as with other CLI tools the GNU versions may be different to the (original) *BSD variants in certain aspects (e.g. parameter names) and inner workings, but it is safe to choose GNU over BSD when you don’t have backward (to the early 80s that is) compatibility to take into account…

EDIT: more details here https://www.ubuntupit.com/freebsd-vs-linux-20-things-to-know-about-both-the-system/ (especially point 9)

2 Likes

Thanks! This is exactly what I needed to know.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.