How do I ping an IP address or a website?
Give the host name or the address, not a web address: ping www.example.com, not ping https://www.example.com/. Windows ping takes a host name or an IP address source.
ping 8.8.8.8
ping -c 4 8.8.8.8 (Linux and macOS: stop after 4)
Addresses that answer, from their operators: hosts to ping.
Which switch does what on each system?
| Job | Windows | Linux | macOS |
|---|---|---|---|
| How many | /n 4, default 4 source | -c 4 source | -c 4 source |
| Data bytes | /l 32, default 32 source | -s 56, default 56 source | -s 56, default 56 source |
| Wait for a reply | /w 4000, ms source | -W 2, seconds source | -W 2000, ms source |
| Keep going | /t source | no -c | no -c source |
| IPv6 only | /6 source | -6 source | not quoted |
Which system are you on?
- Ping on WindowsThe switches, from the maker’s manual.
- Ping on LinuxSix commands we ran, with what they printed.
- Ping on macOSThe switches, from the maker’s manual.