pings.in Menu

Ping command: how to ping on Windows, Linux and macOS

Open a terminal, type ping, a space and a host name or address, and press Enter. Windows sends 4 pings and stops source; on a Mac, ping runs until interrupted unless -c gives a count source.

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?

One job, three systems, from each maker’s manual
JobWindowsLinuxmacOS
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 sourceno -cno -c source
IPv6 only/6 source-6 sourcenot quoted

How do I stop it?

On Windows, Ctrl+C quits and Ctrl+Break shows the totals source. On Linux, Ctrl-C sends SIGINT source, and ping prints its summary when interrupted source.

Which system are you on?