[[command-line-options]]
=== Command Line Options

The following command line options are available for Packetbeat. To use these options,
you need to start Packetbeat in the foreground. 

TIP: Run `./packetbeat -h` to see the full list of options from the command line.

==== Packet-Beat Specific Options
These command line options are specific to Packetbeat:

*`-I <file>`*::
Pass a pcap file as input to Packetbeat instead of reading packets from the network.
This option is useful only for testing Packetbeat. Example: `-I ~/pcaps/network_traffic.pcap`.

*`-O`*::
Read packets one by one by pressing _Enter_ after each. This option is useful only for testing Packetbeat.

*`-devices`*::
Print the list of devices that are available for sniffing.

*`-dump <file>`*::
Write all captured packets to a file. This option is useful for troubleshooting Packetbeat.

*`-l <n>`*::
Read the pcap file `n` number of times. Use this option in combination with the `-I` option.
For an infinite loop, use _0_. The `-l` option is useful only for testing Packetbeat.

*`-t`*::
Read the packets from the pcap file as fast as possible without sleeping. Use this option in combination with the `-I` option. The `-t` option is useful only for testing Packetbeat.

*`-waitstop <n>`*::
Wait an additional `n` seconds before exiting.

==== Other Options

These command line options from libbeat are also available for Packetbeat:

include::../../libbeat/docs/shared-command-line.asciidoc[]



