How To Ping Multiple Address At a Time By Using The Linux Ping Command

linux multiple ping command

Sometimes, there is a need to ping multiple addresses … standard “ping” does not support this process, so you need to install a program named fping, nmap and something similar … but what if the installation of the new packages is not allowed for some reason? The solution is simple … to create a small function that will ping all the addresses we are sending to it and call it with addresses as input parameters. Here’s the function which has ultra-creative name – „pings“.

This is just a copy-paste to the terminal, so call the function with `pings ip-address-1 ip-address-2 domain host whatever, and if some ping breaks it will print in red to make your eyes pop… for example…

linux ping command

If you need this all the time, put this function in your .bash_profile or in / etc / profiles if it should be accessible to all users. Of course, you can also change the appearance of the output yourself, type to remove this echo with a separator or whatever. Exit ping, as usual with CTRL-C.

Leave a Reply

Your email address will not be published. Required fields are marked *