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

FlagDescription
-cStop after N packets
-iInterval between packets in seconds
-WTimeout for each reply
-sPacket size in bytes
-4Use IPv4 only
-6Use 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

Related tools