Network
ping
Send ICMP echo requests to test network connectivity to a host.
Synopsis
syntax
ping [OPTION]... DESTINATION
Examples
Ping Google (Ctrl+C to stop)
ping google.com
Send exactly 5 pings
ping -c 5 8.8.8.8
Ping with 2-second timeout
ping -c 3 -W 2 192.168.1.1
Fast ping every 0.5 seconds
ping -i 0.5 -c 10 host.example.com
Common options
| Flag | Description |
|---|---|
| -c | Stop after N packets |
| -i | Interval between packets in seconds |
| -W | Timeout for each reply |
| -s | Packet size in bytes |
| -4 | Use IPv4 only |
| -6 | Use IPv6 only |
About ping
The `ping` command send ICMP echo requests to test network connectivity to a host. Networking commands handle connectivity testing, DNS resolution, data transfer, remote access, firewall rules, and traffic analysis.
Linux is the dominant server operating system, and strong networking skills are essential for web hosting, container orchestration, security auditing, and infrastructure management. The command accepts 6 commonly used flags shown above, though the full set of options is available in the man page (`man ping`).
The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More Network Commands
Other commands in the Network category