yum install iputils
Ping is a network administration utility tool to check reachability of network node (computer or router) from a computer where the command runs. It also gives the round trip time required for a network packet to travel from the source to destination and back. Network administrators use this utility almost every day. Generally ping is pre-installed on most of the computers; we do not need to worry about where to get it from. But it might not always be available. How to install it on RedHat based Linux system? You might want to install it using yum as it is the simplest way to install package on Linux. Only thing you need to know is the package name. ping or ping6 both are part of iputils package. So you need to run the following command
yum install iputils
During installation you will be asked for a confirmation to proceed.
Total download size: 161 k Installed size: 377 k Is this ok [y/d/N]:
You have to enter ‘y’.
How to know that ping is not available on you system?
If you try to ping www.google.com like
ping www.google.com
You will get an error message like this
ping: command not found
This does not confirm that ping is not installed on your system though. Your PATH variable may not be set properly. To confirm issue this command to see the package detail
yum info iputils
Output:
Available Packages Name : iputils Arch : x86_64 Version : 20140519 Release : 4.fc21 Size : 161 k Repo : fedora/21/x86_64 Summary : Network monitoring tools including ping URL : https://github.com/iputils/iputils License : BSD and GPLv2+ Description : The iputils package contains basic utilities for monitoring a network, : including ping. The ping command sends a series of ICMP protocol : ECHO_REQUEST packets to a specified network host to discover whether : the target machine is alive and receiving network traffic.
The first line “Available Packages” means the iputils package is available in the rpm repository on internet but not installed on you computer.
How to install the package is already discussed using yum install iputils.
After installation is complete, if you run the yum info iputils command again, you will see the similar output.
yum info iputils Loaded plugins: langpacks Installed Packages Name : iputils Arch : x86_64 Version : 20121221 Release : 2.fc19 Size : 360 k Repo : installed From repo : koji-override-0 Summary : Network monitoring tools including ping URL : http://www.skbuff.net/iputils License : BSD and GPLv2+ Description : The iputils package contains basic utilities for monitoring a network, : including ping. The ping command sends a series of ICMP protocol : ECHO_REQUEST packets to a specified network host to discover whether : the target machine is alive and receiving network traffic.
This time you will see a line “Installed Packages”. That confirms that the package is installed on you system. Now you can ping a network host like www.google.com like this
ping www.google.com PING www.google.com (74.125.68.103) 56(84) bytes of data. 64 bytes from sc-in-f103.1e100.net (74.125.68.103): icmp_seq=1 ttl=128 time=112 ms 64 bytes from sc-in-f103.1e100.net (74.125.68.103): icmp_seq=2 ttl=128 time=112 ms 64 bytes from sc-in-f103.1e100.net (74.125.68.103): icmp_seq=3 ttl=128 time=111 ms 64 bytes from sc-in-f103.1e100.net (74.125.68.103): icmp_seq=4 ttl=128 time=112 ms