Bash Script to Check Server Connectivity | Ping Script in Linux

Опубликовано: 14 Май 2026
на канале: The Learning Tree
11
0

Bash Script to Check Server Connectivity using Ping

In this video, we create a simple Bash script that checks whether a host or server is reachable using the ping command.

This is a common script used by Linux administrators and DevOps engineers to monitor server connectivity.

Script used in the video:

Join our DevOps learning community:
👉 https://t.me/the_learning_tree

This script sends 3 ping requests to the host and checks the exit status of the ping command.

If the server responds successfully, it prints host is reachable, otherwise it prints host is not reachable.

This type of script can be used in monitoring scripts, automation tools, or DevOps workflows.