Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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'm a newbie and I'd like to know about the Ping command on Linux (I'm using Ubuntu 11.04).

After pinging a PC on my network, how can I make the target PC respond to my ping calls? I can see that the bytes are transmitted to the target but how do I ensure the target responds to the calls?

share|improve this question

migrated from Oct 10 '11 at 10:20

This question came from our site for professional and enthusiast programmers.

Am I right in thinking you want the target PC to react/respond when it receives a ping? Example, alert the user? When you ping the target PC it should automatically reply and you should receive output detailing the latency between the two machines. In this sense it is already responding. Are you receiving time-out messages? – Ionis Oct 10 '11 at 9:49

Most PCs should respond to ping

$ ping -c 5 black
PING ( from : 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=128 time=0.231 ms
64 bytes from ( icmp_seq=2 ttl=128 time=0.209 ms
64 bytes from ( icmp_seq=3 ttl=128 time=0.210 ms
64 bytes from ( icmp_seq=4 ttl=128 time=0.211 ms
64 bytes from ( icmp_seq=5 ttl=128 time=0.210 ms

--- ping statistics ---
5 packets transmitted, 5 received, 0% loss, time 3999ms
rtt min/avg/max/mdev = 0.209/0.214/0.231/0.012 ms

If they don't respond, I'd check any "firewall" configuration on the target PC.

Firewall, Advanced, ICMP, "allow incoming icmp request"

or command line

netsh firewall set icmpsetting 8 enable

(Assuming the target PC is running Windows (specifically XP)).

share|improve this answer

Target PC responds to ping when it is configured in that way. By default, most servers ignore ping requests.

Try ping and ping localhost. You will see the difference.

share|improve this answer
i wouldnt say most are configured to ignore ping, including which pings just fine here. icmp is likely discarded at your network perimeter. – Sirex Oct 10 '11 at 11:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .