Testing Connectivity (ping)
Concept & Overview
Imagine trying to load a webpage, but your browser spins endlessly, leaving you wondering if your home Wi-Fi is disconnected or if the website itself has crashed. In Linux, we test our basic network connection using the ping command.
- The ping command sends tiny packets of data to a server (like google.com) and measures how many milliseconds it takes to receive a response.
- On Linux, ping will keep running forever by default. To make it stop after a few attempts, we use the -c (count) flag, running ping -c 3 google.com.
Why this matters: If you run ping google.com without -c, it will continue sending packets and printing output infinitely. You will have to manually interrupt it with Ctrl+C to run any other commands. The -c 3 flag stops the command automatically after sending exactly 3 packets.
google.com by sending exactly 3 packets: ping -c 3 google.com.Command Syntax Reference
| Command / Syntax | Description |
|---|---|
ping -c 3 google.com | Send 3 echo packets to google.com |
Verification Objectives
These conditions will be automatically verified when you run commands inside the interactive terminal simulator:
- ○Ping google.com exactly 3 times using -c flag
Ready to complete Quest 70?
Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.