ubuntu ping: command not found

Ubuntu 20.04中,没有ping命令

ping onitroad.com
bash: ping: command not found

ping命令属于iputils-ping软件包,让我们安装它。

更新系统包索引:

$ sudo apt update

安装丢失的ping命令:

$ sudo apt install iputils-ping

使用ping命令

$ which ping
/usr/bin/ping
$ ping -c 1 onitroad.com
PING onitroad.com (101.26.3.23) 56(84) bytes of data.
64 bytes from 101.26.3.23 (101.26.3.23): icmp_seq=1 ttl=59 time=12.1 ms
--- onitroad.com 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
日期:2020-07-07 20:55:50 来源:oir作者:oir