Wazaterm » Linux Commands » ping

How to use ping Linux command

The ping command uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. ECHO_REQUEST datagrams (“pings”) have an IP and ICMP header, followed by a struct timeval and then an arbitrary number of “pad” bytes used to fill out the packet.

Usage

Check if a host is up with IPv6 address

    
      $ ping -6 www.google.com
    
  

Check whether a remote host is up with 3 seconds interval and 5 times

    
      $ ping -c 5 -i 3 www.google.com
    
  

Check local network by ping localhost

    
      $ ping 0