Fping – A Command-Line Tool to Ping Hosts In Parallel on Ubuntu

Fping is a command-line tool that sends ICMP echo probes to network hosts, similar to the traditional ping command. However, unlike ping, fping can check multiple hosts simultaneously in parallel, making it much more efficient for network monitoring and troubleshooting tasks.

Installing Fping

To install fping on Ubuntu, use the following command −

sudo apt-get install fping

The installation output will show package information and confirm successful installation −

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  fping
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 30.7 kB of archives.
After this operation, 65.5 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 fping amd64 [30.7 kB]
Fetched 30.7 kB in 1s (42.3 kB/s)
Selecting previously unselected package fping.
(Reading database ... 185743 files and directories currently installed.)
Preparing to unpack .../fping_4.2-1_amd64.deb ...
Unpacking fping (4.2-1) ...
Setting up fping (4.2-1) ...

Basic Usage

Pinging a Single Host

To check if a single host is reachable −

fping tutorialspoint.com
tutorialspoint.com is alive

Pinging Multiple Hosts

To test multiple hosts simultaneously −

fping www.tutorialspoint.com www.google.com www.github.com
www.tutorialspoint.com is alive
www.google.com is alive
www.github.com is alive

Using Host Lists from Files

If you have a large number of hosts stored in a file, you can use −

fping < hosts.txt

Or alternatively −

fping -f hosts.txt

Common Options

Option Description Example
-a Show only alive hosts fping -a host1 host2 host3
-u Show only unreachable hosts fping -u host1 host2 host3
-c n Send n ping packets to each host fping -c 4 google.com
-q Quiet mode (no per-host output) fping -q -a host1 host2
-g Generate IP range fping -g 192.168.1.1 192.168.1.254

Examples

Scanning IP Range

To ping all hosts in a subnet −

fping -g 192.168.1.0/24

Continuous Monitoring

To continuously monitor hosts −

fping -l google.com

Getting Statistics

To get detailed statistics −

fping -s -c 4 google.com tutorialspoint.com

Advantages

  • Parallel Processing − Tests multiple hosts simultaneously, saving time

  • Efficient − Much faster than running multiple ping commands sequentially

  • Flexible Output − Various options for displaying results

  • Scripting Friendly − Easy to integrate into shell scripts and monitoring tools

Conclusion

Fping is a powerful network diagnostic tool that excels at testing multiple hosts concurrently. It's particularly useful for network administrators who need to quickly assess the availability of multiple hosts, making it an essential tool for network monitoring and troubleshooting tasks.

Updated on: 2026-03-17T09:01:38+05:30

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements