How to Install ping Command on Ubuntu Linux
You install the ping command on Ubuntu Linux by installing the iputils-ping package.
The ping command is a vital network utility that checks connectivity between devices on an IP network. It works by sending ICMP echo request packets and waits for replies, helping you diagnose network problems.
While ping is usually built-in, minimal Ubuntu installations or Docker containers might lack it. If you encounter a “command not found” error when you try to use ping, this guide will show you how to install it.
You might also see a “Package ‘ping’ has no installation candidate” error if you attempt a standard apt install ping, as that’s not the correct package name.
Install the iputils-ping package using the command sudo apt install iputils-ping. This package provides the ping utility, which is essential for testing network connectivity on Ubuntu. After installation, you can use ping to diagnose network issues.
Install ping command
Because the ping command can be missing in minimal Ubuntu installations or when using Ubuntu as a Docker container, here’s how to get it installed.
To install ping, you’ll need the package named iputils-ping. You’ll use the command `sudo apt update && sudo apt install iputils-ping` 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!
Conclusion:
- The
pingcommand is a vital network utility for testing connectivity in Ubuntu Linux. - Installing the
iputils-pingpackage is necessary to use thepingcommand in minimal Ubuntu editions or Ubuntu running as a Docker. - Verifying network connectivity using
ping localhostcan ensure that the installation was successful.
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!