Last Updated on February 3, 2022 by admin
Tutorial to install ping on Ubuntu in a Docker container
Docker is a set of platforms as a service where you can use containers to deliver the software or applications. So you are using Ubuntu in a docker container and trying to run a command to execute a ping command then you might have come across the error like:
bash: ping: command not found
and the funniest but frustrating part is then when you try to install the ping tool command and again you have to deal with errors like:
E: Unable to locate package ping
Most people might ask why the Ping command is missing as Ping is installed by default in most of the Linux operating systems. Ping will be missing from Ubuntu if you have installed the minimal version of Ubuntu.
Install Ping On Ubuntu: Ping Command Not Found
For your kind information, the ping tool is a part of iputils-ping package and you need to install iputils-ping package to get the ping tool command in your Ubuntu. Run the following command to install iputils-ping package to get the ping tool.
apt install iputils-ping
Now, you can use the ping command without any issue in Ubuntu in a docker container and don’t forget to make permanent changes to the image and the subsequent containers in your docker otherwise you won’t get the ping command once you restarted your docker.
Summary: This is the solution for the “ping command not found” error on Ubuntu in a docker container. I hope this process works without any issue in your system.
Meanwhile, check our blog post on: