Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server which listens on a socket for incoming connections and outputs a welcome text ("Hello world"). What is the simplest way to test this with plain tools from the operating system (here OS X)? I'd imagine something like a good old RS232-terminal application:

mac:~ mike$ terminal 1234
Hello world
share|improve this question
up vote 10 down vote accepted

Depends on the kind of tests you want to run? If you want to test establishing a connection and sending some data I can think of two simple tests. Use netcat (nc) to "echo" some data into a remote socket, or use telnet to connect to it interactively.

If your server is listening on, port 1234 you could test it like this:

bro@host:~ $ echo "Some data to send" | nc 1234

Same address/port as above, but make the session interactive:

bro@host:~ $ telnet 1234
Connected to
Escape character is '^]'.
Type some data to send here
share|improve this answer
Thanks, I've tried telnet, but it timed out. As I found out, it was a firewall issue. – Mike L. Nov 3 '10 at 19:56

Your Answer


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.