Depending on your Ubuntu 20.04 Server/Desktop installation your system might not come with the ping command pre-installed. This is especially the case for docker containers. Any attempt to ping a remote system will result in the following error:

ping linuxconfig.org
bash: ping: command not found

Install the ping command on Ubuntu 20.04 step-by-step instructions

  1. Update the system package index:
    $ sudo apt update
  2. Install the missing ping command:
    $ sudo apt install iputils-ping
    
  3. The missing ping command should now be installed and ready to use:
    $ which ping
    /usr/bin/ping
    $ ping -c 1 linuxconfig.org
    PING linuxconfig.org (104.26.3.13) 56(84) bytes of data.
    64 bytes from 104.26.3.13 (104.26.3.13): icmp_seq=1 ttl=59 time=12.1 ms
    
    --- linuxconfig.org ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 12.122/12.122/12.122/0.000 ms
Was this answer helpful? 0 Users Found This Useful (0 Votes)