Windows
Linux
Networking
Windows ping equivalent in Linux
Sends ICMP echo requests to test if a host is reachable. Same name, but runs forever by default on Linux.
Windows
→
ping
Linux equivalents
ping
ping
ping
Overview
What this command does
Sends ICMP echo requests to test if a host is reachable. Same name, but runs forever by default on Linux.
Migration tip: On Windows, ping sends 4 packets then stops. On Linux, ping runs forever until you press Ctrl+C. Use
-c 4 to match Windows behavior.Practical tasks
Common use cases
Test network connectivity
Sends ICMP echo requests to test if a host is reachable. Same name, but runs forever by default on Linux.
ping -c 4
Send only 4 packets (like Windows default)
ping -i 2
Wait 2 seconds between packets
ping -s 1000
Use larger packet size
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
ping google.com
ping -c 4 google.com
ping -c 4 192.168.1.1
Walkthrough
Examples with explanations
# Windows: ping google.com (sends 4 packets, stops)
ping google.com # runs FOREVER — press Ctrl+C to stop
ping -c 4 google.com # send exactly 4 packets, then stop
ping -c 4 192.168.1.1 # ping your router by IP
Reference
Common options and variations
| Command or option | Use |
|---|---|
ping -c 4 | Send only 4 packets (like Windows default) |
ping -i 2 | Wait 2 seconds between packets |
ping -s 1000 | Use larger packet size |
ping6 | Ping using IPv6 |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | ping |
Same command on this distribution. |
| Fedora | same command | ping |
Same command on this distribution. |
| Arch | same command | ping |
Same command on this distribution. |
Important
What to watch out for
On Linux, ping runs indefinitely. Always use -c N to limit packet count, or press Ctrl+C to stop it.
Keep learning