linuxコマンド-ping

1485 ワード

機能


send ICMP ECHO_REQUEST packets to network hostsターゲットネットワークホストに「ICMP ECHO_REQUEST」パッケージを送信
注記:pingコマンドは、通常、ターゲットホストへのネットワークがスムーズであるかどうかをテストするために使用されます.

使用法

  • ping hostname-pingホスト名
  • $ ping baidu.com
    PING baidu.com (123.125.115.110): 56 data bytes
    64 bytes from 123.125.115.110: icmp_seq=0 ttl=48 time=100.988 ms
    64 bytes from 123.125.115.110: icmp_seq=1 ttl=48 time=46.486 ms
    64 bytes from 123.125.115.110: icmp_seq=2 ttl=48 time=60.061 ms
    64 bytes from 123.125.115.110: icmp_seq=3 ttl=48 time=38.893 ms
    64 bytes from 123.125.115.110: icmp_seq=4 ttl=48 time=121.215 ms
    ^C
    --- baidu.com ping statistics ---
    5 packets transmitted, 5 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 38.893/73.529/121.215/32.063 ms
    
  • ping ipaddress-ping IPアドレス
  • $ ping 123.125.115.110
    PING 123.125.115.110 (123.125.115.110): 56 data bytes
    64 bytes from 123.125.115.110: icmp_seq=0 ttl=48 time=63.767 ms
    64 bytes from 123.125.115.110: icmp_seq=1 ttl=48 time=41.673 ms
    64 bytes from 123.125.115.110: icmp_seq=2 ttl=48 time=33.730 ms
    64 bytes from 123.125.115.110: icmp_seq=3 ttl=48 time=34.149 ms
    64 bytes from 123.125.115.110: icmp_seq=4 ttl=48 time=96.654 ms
    ^C
    --- 123.125.115.110 ping statistics ---
    5 packets transmitted, 5 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 33.730/53.995/96.654/23.965 ms