A network technician needs to test connectivity to a remote host but only wants to send one echo request instead of the default continuous ping. Which command should be used on Linux?
- ping -c 1 <host> ✓
- ping -n 1 <host>
- ping -t <host>
- ping --once <host>
Correct answer: ping -c 1 <host>
Option A is correct because on Linux the ping command uses the -c flag to specify the count of echo request packets to send, so 'ping -c 1 hostname' sends exactly one ICMP echo request and then exits. Option B is wrong because -n is a Windows ping flag for specifying the packet count; on Linux, -n changes output to show numeric addresses rather than resolving hostnames. Option C is incorrect because -t on Linux sets the IP Time-To-Live value, not the packet count; on Windows, ping -t sends continuous pings with no count limit. Option D is wrong because '--once' is not a valid ping option on any standard operating system distribution.
Topic: · ping, linux commands, network troubleshooting, icmp