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

Prepare for the LPI Linux Essentials Exam. Study with flashcards and multiple choice questions, each with hints and explanations. Get exam-ready!

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.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy