Home / Networking Commands / ping (Linux)

ping

Packet Internet Groper - Linux Network Tool

What Does It Do?

The ping command sends ICMP ECHO_REQUEST packets to network hosts and displays the response time. It's one of the most fundamental tools for diagnosing network connectivity and measuring latency.

On Linux, ping runs continuously by default until stopped with Ctrl+C. Use the -c option to specify the number of packets to send.

Advertisement

[ Insert Google AdSense Banner Code Here ]

When Should I Use It?

Test Connectivity

Verify if a remote host is reachable over the network.

Measure Latency

Check response times to diagnose slow connections.

Troubleshoot DNS

Test if hostname resolution is working correctly.

Monitor Stability

Detect packet loss and connection interruptions.

Common Commands

ping google.com

Ping google.com continuously (press Ctrl+C to stop).

ping -c 4 google.com

Send exactly 4 ping packets to google.com.

ping 8.8.8.8

Ping Google's DNS server by IP address.

ping -c 10 localhost

Ping your local machine 10 times.

ping -i 2 -c 5 google.com

Send 5 packets with 2 second intervals between each.

ping --help

Display help information for the ping command.

Try It Yourself

Practice using the ping command in the terminal below. Try typing ping google.com or ping -c 10 8.8.8.8