35

I understand that socat is described as a "more advanced" version of netcat, but what is the actual difference? Would it be correct to say that everything you can do in netcat you can also do in socat? What about the opposite (everything you can do with socat can also be done in netcat)?

25

socat can do serial line stuff, netcat cannot. socat can do fairly advanced functionality, like having multiple clients listen on a port, or reusing connections.

11

Netcat is like socat with only the STDIO, TCP, TCP-LISTEN, UDP, and UDP-LISTEN address types with fewer options for those address types.

What is the purpose of your question? When to use which? If so, the answer is: use netcat if it can solve your problem; use socat otherwise.

2

Very (very, very) simply put, netcat is a telnet that you can use in scripts. Plus is can be used as a simple listener if you want. And yes socat can do more stuff than netcat, but to verify whether it is a superset, you need to compare command line options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.