Skip to content

fping Linux Command Guide

fping is a command-line tool used to quickly ping multiple IP addresses to check their connectivity. It is faster than the traditional ping command and can be used to ping a range of IP addresses as well. Additionally, fping allows for customizing the number of ping packets sent, the time between pings, and can output the results in different formats. This makes it a powerful tool for network administrators and sysadmins to troubleshoot network issues efficiently.

fping Syntax:

Terminal window
fping [options] [parameters]

Options:

OptionDescription
-aShow targets that are alive
-bAllow pinging a broadcast address
-cNumber of pings to send
-gGenerate target list from given IP network
-qQuiet mode (output essential information)
-tTimeout in milliseconds
-vVerbose output
-4Use IPv4
-6Use IPv6
-hPrint usage information and exit

Parameters:

ParameterDescription
TargetThe hostnames or IP addresses to ping
FileSpecifying a file with a list of targets

fping Command Samples:

Ping a Single IP Address

Terminal window
fping 192.168.1.1

Pings the specific IP address “192.168.1.1” to test network connectivity.

Ping Multiple IP Addresses

Terminal window
fping 192.168.1.1 192.168.1.2 192.168.1.3

Pings multiple IP addresses “192.168.1.1”, “192.168.1.2”, and “192.168.1.3” concurrently.

Ping IP Addresses from a File

Terminal window
fping -f ip_list.txt

Pings the IP addresses listed in the file “ip_list.txt” to test network connectivity.

Send a Specific Number of Echo Requests

Terminal window
fping -c 5 192.168.1.1

Sends 5 echo requests to the IP address “192.168.1.1”.

Set the Time Interval Between Pings

Terminal window
fping -p 1000 192.168.1.1

Sets the time interval between pings to 1000 milliseconds (1 second) for the IP address “192.168.1.1”.

Show IP Addresses that are Reachable

Terminal window
fping -a 192.168.1.1 192.168.1.2 192.168.1.3

Ping multiple IP addresses and display only the ones that are reachable.

Display Statistics After Pinging

Terminal window
fping -s 192.168.1.1

Pings the IP address “192.168.1.1” and shows statistics at the end.

fping FAQ:

How do I use fping in Linux?

To use the fping command in Linux, execute the following command:

Terminal window
fping --version

What is the purpose of the fping command?

The fping command is used to ping multiple hosts simultaneously, which is helpful for network analysis, as it can quickly show the status of multiple hosts in a single command.

How can I ping specific IP addresses using fping?

To ping specific IP addresses using fping in Linux, you can specify the IP addresses you want to ping as arguments. For example:

Terminal window
fping 192.168.1.1 192.168.1.2 192.168.1.3

How do I customize the output format of fping in Linux?

To customize the output format of fping in Linux, you can use options like -c for continuous output, -q for quick (quiet) output, and -e for showing elapsed times. For example:

Terminal window
fping -c 5 -q google.com

Can I use fping to send an ICMP echo request with a specific interval?

Yes, you can use the -i option in fping to set a specific interval (in milliseconds) between sending ICMP echo requests. For example:

Terminal window
fping -i 1000 google.com

How can I get additional help and information about fping command options?

To get more detailed information about the fping command options and their usage, you can refer to the man page by running:

Terminal window
man fping

Applications of the fping command

  • Checking the availability of multiple hosts in a network
  • Monitoring network devices and servers for responsiveness
  • Troubleshooting network issues and determining network latency
  • Testing the reachability of hosts in a network
  • Batch monitoring of network hosts for availability