Linux网络连接测试


 description

在linux中测试另一台主机是否可以访问,连接测试192.168.1.121的主机

 command

ping -c 5 192.168.1.121

 parameter

ping :  测试目的站是否可达及了解其有关状态
-c :  指定ping的次数

 result

PING 192.168.1.121 (192.168.1.121) 56(84) bytes of data.
64 bytes from 192.168.1.121: icmp_seq=1 ttl=64 time=0.209 ms
64 bytes from 192.168.1.121: icmp_seq=2 ttl=64 time=0.153 ms
64 bytes from 192.168.1.121: icmp_seq=3 ttl=64 time=0.191 ms
64 bytes from 192.168.1.121: icmp_seq=4 ttl=64 time=0.157 ms
64 bytes from 192.168.1.121: icmp_seq=5 ttl=64 time=0.215 ms

--- 192.168.1.121 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.153/0.185/0.215/0.025 ms

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.