LPI Linux Essentials Practice Exam 2025 – All-in-One Guide to Master Your Certification!

Question: 1 / 400

How would you limit the ping command to send only five packets to a remote host?

ping -n 5 host.example.com

ping -c 5 host.example.com

Using the command `ping -c 5 host.example.com` is the correct way to limit the ping command to send only five packets to a remote host. The `-c` option stands for "count" and specifies the number of echo request packets that will be sent to the target host. In this case, when you set it to 5, the ping command will send exactly five packets and then terminate.

This behavior of the `-c` option is a standard feature in many Unix-like operating systems. It allows users to control the number of packets sent, which can be particularly useful for testing connectivity or measuring network performance without overwhelming the network or the target device.

Get further explanation with Examzify DeepDiveBeta

ping -s 5 host.example.com

ping -p 5 host.example.com

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy