Ubuntu系统中没有ping怎么办?

没有ping真的很不方便,没法检测网络

ping在Ubuntu的iputils-ping这个包里,可以先search一下:

sudo apt search iputils
Sorting... Done
Full Text Search... Done
iputils-arping/jammy 3:20211215-1 amd64
  Tool to send ICMP echo requests to an ARP address

iputils-clockdiff/jammy 3:20211215-1 amd64
  Measure the time difference between networked computers

iputils-ping/jammy 3:20211215-1 amd64
  Tools to test the reachability of network hosts

iputils-tracepath/jammy 3:20211215-1 amd64
  Tools to trace the network path to a remote host

lsm/jammy 1.0.4-2 amd64
  Link connectivity monitor tool

查看到全名是iputils-ping,现在可以使用apt install 来安装了:

 sudo apt install iputils-ping
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  iputils-ping
0 upgraded, 1 newly installed, 0 to remove and 180 not upgraded.
Need to get 42.9 kB of archives.
After this operation, 116 kB of additional disk space will be used.
Get:1 http://mirrors.ustc.edu.cn/ubuntu jammy/main amd64 iputils-ping amd64 3:20211215-1 [42.9 kB]
Fetched 42.9 kB in 0s (88.1 kB/s) 
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package iputils-ping.
(Reading database ... 66456 files and directories currently installed.)
Preparing to unpack .../iputils-ping_3%3a20211215-1_amd64.deb ...
Unpacking iputils-ping (3:20211215-1) ...
Setting up iputils-ping (3:20211215-1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
Scanning processes...                                              
Scanning linux images...                                           

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on
 this host.

这时候ping就可以用了:

ping csdn.net
PING csdn.net (124.70.25.132) 56(84) bytes of data.
64 bytes from ecs-124-70-25-132.compute.hwclouds-dns.com (124.70.25.132): icmp_seq=1 ttl=49 time=32.1 ms
64 bytes from ecs-124-70-25-132.compute.hwclouds-dns.com (124.70.25.132): icmp_seq=2 ttl=49 time=33.6 ms

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值