In this recipe, we demonstrate two methods. The first method uses ping and the second method uses fping. The fping command is easier for scripts and has more features than the ping command. It may not be part of your Linux distribution, but can be installed with your package manager.