Skip to content

ping: Command Not Found

ping is a program that can use ICMP ECHO packets to control access to hosts on the network and inform you about delays. What can be done with ping is not limited to this. However, the capabilities of ping will be the subject of another article.

If you get the error "command not found" when you try to run the ping command on your Ubuntu system, you need to install the package containing the ping command. For this, you can use:

apt-get install iputils-ping

command.

This way, you can resolve the "ping command not found" error. If your error is not resolved even though you installed this package, list the package files and make sure the directory where the ping command is located is defined in your $PATH variable:

iputils-ping package files
ali@zion:~$ dpkg -L iputils-ping
/.
/bin
/bin/ping
/usr
/usr/share
/usr/share/doc
/usr/share/doc/iputils-ping
/usr/share/doc/iputils-ping/NEWS.Debian.gz
/usr/share/doc/iputils-ping/changelog.Debian.gz
/usr/share/doc/iputils-ping/copyright
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/ping.8.gz
/bin/ping4
/bin/ping6
/usr/share/man/man8/ping4.8.gz
/usr/share/man/man8/ping6.8.gz
ali@zion:~$ echo $PATH
/home/ali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin