ubuntu 16.04 LTS - ping IP

ubuntu 16.04 LTS - ping IP

1. ping 192.168.1.198

strong@foreverstrong:~$ ping 192.168.1.198
PING 192.168.1.198 (192.168.1.198) 56(84) bytes of data.
64 bytes from 192.168.1.198: icmp_seq=1 ttl=128 time=6.26 ms
64 bytes from 192.168.1.198: icmp_seq=2 ttl=128 time=18.0 ms
64 bytes from 192.168.1.198: icmp_seq=3 ttl=128 time=11.9 ms
64 bytes from 192.168.1.198: icmp_seq=4 ttl=128 time=14.3 ms
64 bytes from 192.168.1.198: icmp_seq=5 ttl=128 time=3.42 ms
64 bytes from 192.168.1.198: icmp_seq=6 ttl=128 time=3.27 ms
64 bytes from 192.168.1.198: icmp_seq=7 ttl=128 time=3.52 ms
^C
--- 192.168.1.198 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6007ms
rtt min/avg/max/mdev = 3.271/8.686/18.014/5.595 ms

Linux 命令行下使用该命令会无限 ping 下去,可以使用 Ctrl + C 结束程序执行。

2. ping -c 3 192.168.1.198

strong@foreverstrong:~$ ping -c 3 192.168.1.198
PING 192.168.1.198 (192.168.1.198) 56(84) bytes of data.
64 bytes from 192.168.1.198: icmp_seq=1 ttl=128 time=3.17 ms
64 bytes from 192.168.1.198: icmp_seq=2 ttl=128 time=6.67 ms
64 bytes from 192.168.1.198: icmp_seq=3 ttl=128 time=11.7 ms

--- 192.168.1.198 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 3.178/7.215/11.795/3.540 ms

c 就是 count,ping 的次数。

 

你可能感兴趣的:(Ubuntu,Desktop,Server,LTS)