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

How can I make the ping command in Mac OS X show "request timeout" in its output if no ICMP replies are received, similar to what the Windows ping command does?

share|improve this question
up vote -2 down vote accepted

This is probably what you are looking for:

ping -v
share|improve this answer
This doesn't add a time out. – Richard Hoskins Sep 3 '09 at 15:40
Andrew S answered my question. The following is my trial. Thanks -- $ ping -v PING ( 56 data bytes ping: sendto: No route to host ping: sendto: Host is down ping: sendto: Host is down ping: sendto: Host is down – user9639 Sep 3 '09 at 16:20
Richard H, that isn't what he asked. I think you misunderstood the question. – Andrew S Sep 12 '15 at 1:45

You can set a time out with the -t option. e.g.

 ping -t 5

This will exit after five seconds wether the target is alive or not.

share|improve this answer

Your Answer


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