Pada beberapa image Ubuntu 20.04, aplikasi ping tidak terinstall. Bila ping tidak ada anda akan mendapatkan pesan error

ping google.com
bash: ping: command not found

Install ping Ubuntu 20.04

ping ada di repository Ubuntu 20.04, untuk menginstallnya dibutuhkan akses ke Internet. Bila ini install pertama anda, update metadata apt

sudo apt update

setelah metadata terbaru selesai di update, install aplikasi ping

sudo apt install iputils-ping -y

install ping ubuntu 20.04

Tes aplikasi ping

Setelah terinstall, coba test aplikasi ping

ping -c 5 google.com
ping -c 5 1.1.1.1
 
# output
PING google.com (172.217.175.110) 56(84) bytes of data.
64 bytes from nrt20s21-in-f14.1e100.net (172.217.175.110): icmp_seq=1 ttl=122 time=1.39 ms
64 bytes from nrt20s21-in-f14.1e100.net (172.217.175.110): icmp_seq=2 ttl=122 time=1.45 ms
64 bytes from nrt20s21-in-f14.1e100.net (172.217.175.110): icmp_seq=3 ttl=122 time=1.47 ms
64 bytes from nrt20s21-in-f14.1e100.net (172.217.175.110): icmp_seq=4 ttl=122 time=1.50 ms
64 bytes from nrt20s21-in-f14.1e100.net (172.217.175.110): icmp_seq=5 ttl=122 time=1.52 ms
 
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4007ms
rtt min/avg/max/mdev = 1.390/1.463/1.515/0.042 ms
 
$ ping -c 5 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=61 time=1.54 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=61 time=1.57 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=61 time=1.56 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=61 time=1.67 ms
64 bytes from 1.1.1.1: icmp_seq=5 ttl=61 time=1.58 ms
 
--- 1.1.1.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4007ms
rtt min/avg/max/mdev = 1.541/1.583/1.674/0.046 ms

Leave a comment

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