June 2025
Beginner to intermediate
473 pages
13h 30m
English
You can use the ping command to check the network connection to another computer. The -c option specifies how many Internet Control Message Protocol (ICMP) packets are to be sent in the process (i.e., after how many attempts ping will terminate). Without the option, ping runs on Linux and macOS until you terminate the command via (Ctrl) + (C). The following listing shows a typical ping result:
$ ping -c 4 google.com PING google.com(bud02s41-in-x0e.1e100.net (2a00:1450:400d:802::200e)) 56 data bytes 64 bytes from bud02s41-...: icmp_seq=1 ttl=117 time=15.4 ms 64 bytes from bud02s41-...: icmp_seq=2 ttl=117 time=17.4 ms 64 bytes from bud02s41-...: icmp_seq=3 ttl=117 time=17.3 ms 64 bytes from bud02s41-...: icmp_seq=4 ...
Read now
Unlock full access