How to Install ping Command on Ubuntu Linux

Install the ping command on Ubuntu Linux

The article provides guidance on installing and using the ping command on Ubuntu Linux, primarily used to test network connectivity. In Ubuntu Minimal Edition or Docker, the ping command could be absent. The solution is to install a package named ‘iputils-ping’ which will restore the ping functionality.

This article explains how to install and use the ping command on Ubuntu Linux.

The ping command is a network utility used to test the connectivity between two devices on a network, typically over an IP network (such as the Internet). It is installed on most operating systems by default.

However, the ping command may not be installed if you have a minimal version of Ubuntu or use Ubuntu as a Docker. If you try to use the ping command, you may get an error that the command cannot be found.

The default apt install ping command in Ubuntu also returns an error that reads, “Package ‘ping’ has no installation candidate.”

Install ping command

As mentioned, if you install Ubuntu Minimal Edition or use Ubuntu as a Docker, the ping command may be missing from the operating systems.

Here’s how to install it.

To install ping, you have to install a package called iputils-ping. The command is how to install it.

sudo apt install iputils-ping

Once the package is installed, you can use the ping command to test network connectivity.

ping localhost

That should do it!


This post showed you how to install the ping command on Ubuntu Linux. If you find errors above or have something to add, please use the comments form below.

Posted by

I love computers; maybe way too much. What I learned I try to share at

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.