Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)?

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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