About
ping sends echo requests to a host and reports whether replies come back. Reach for it first when something seems unreachable. It tells you quickly whether the fault is local, further out, or in name resolution.
Install it
pkg install iputils
Run this inside Termux. If the package is already present, pkg will say so and
do nothing.
Commands worth knowing
5 of the invocations you will actually reach for. Tap the copy button to put one on your clipboard.
ping -c 4 example.com Send four echo requests and report the round-trip times. The first check for an unreachable host. ping -c 5 -i 0.2 192.168.1.1 Probe your own router rapidly. Tells you whether packet loss sits on the local link. ping -s 1400 -c 3 example.com Test with larger payloads. Exposes an MTU fault on big transfers. ping -6 example.com Force an IPv6 lookup. Confirms the host answers over the newer protocol. ping -c 10 -W 1 8.8.8.8 Measure stability to a public resolver. A short timeout makes dead probes fail fast. Worked example
Run ping -c 4 example.com and this is what you should see.
$ ping -c 4 example.com
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 11.104/11.452/11.874/0.312 ms
64 bytes from 93.184.216.34: icmp_seq=1 ttl=56 time=11.2 ms
64 bytes from 93.184.216.34: icmp_seq=2 ttl=56 time=11.4 ms Developed by
The iputils maintainers .