Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Simple question how do you ping using terminal for example Google and get back the statistics of it? I mean packets transmitted packets lost ttl etc. because I tried different options using ping --help but typing ping www.google.com the list in Terminal just keeps roll down icmp_req=1 icmp_req=2 icmp_req=3 and 4,5,6,7 and so on... and looks like never to stop.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

You can also tell ping the number of pings to send, or 'count.'

ping -c3 www.google.com

PING www.google.com (74.125.228.49) 56(84) bytes of data. 64 bytes from iad23s06-in-f17.1e100.net (74.125.228.49): icmp_seq=1 ttl=50 time=34.0 ms 64 bytes from iad23s06-in-f17.1e100.net (74.125.228.49): icmp_seq=2 ttl=50 time=38.8 ms 64 bytes from iad23s06-in-f17.1e100.net (74.125.228.49): icmp_seq=3 ttl=50 time=38.8 ms

--- www.google.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 34.053/37.272/38.897/2.287 ms

share|improve this answer
    
yes! that works too, thanx. –  JohnnyEnglish Jan 28 at 21:46

All you need to do is hit Ctrl-C in the terminal, and it will stop. Then it will display the results you're looking for.

PING google.com (74.125.228.72) 56(84) bytes of data.
64 bytes from iad23s07-in-f8.1e100.net (74.125.228.72): icmp_seq=1 ttl=57 time=40.2 ms
64 bytes from iad23s07-in-f8.1e100.net (74.125.228.72): icmp_seq=2 ttl=57 time=42.7 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 40.247/41.505/42.764/1.274 ms
share|improve this answer
    
hah indeed! thanx man a lot, I appreciate it. –  JohnnyEnglish Jan 28 at 21:39
    
No problem. Glad I could help! –  Vote4Nixon Jan 28 at 21:40

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.