Send four echo requests to the host.
ping -c 4 example.comSend diagnostic echo requests to test network reachability.
ping [OPTION]... DESTINATIONSend four echo requests to the host.
ping -c 4 example.comSend three requests through eth0 (if permitted).
ping -I eth0 -c 3 192.0.2.1| Option / clause | Description |
|---|---|
-c COUNT | Stop after sending COUNT requests. |
-i INTERVAL | Wait INTERVAL seconds between requests. |
-s SIZE | Set the number of payload bytes. |
-W TIMEOUT | Wait TIMEOUT seconds for a response. |
-I INTERFACE|ADDRESS | Set the outgoing interface or source address. |
-n | Do not resolve addresses to hostnames. |
-4 / -6 | Use IPv4 or IPv6 only. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.