Ping — Test Network Connectivity
The ping command checks if another machine is reachable over the network.
- Sends packets (ICMP Echo Request)
- Requires an IP address or hostname
- Continues until Ctrl + C
- Use
-cto limit number of packets
Example:
Output shows:

| Case | Explanation |
|---|---|
| Why ping may fail? | - Device is offline. - Wrong IP address . - System or network configured to block ping for security |
| Ping Hostnames | - ping domain names: ping -c 3 google.com- DNS is working. - Network connection is active. - Remote server reachable |