ping Linux Commands

What is Linux ping Command?

Explanation

ping COMMAND:

System administration command. Confirm that a remote host is online and responding. Ping is used for verifying connectivity between two hosts on a network. It sends Internet Control Message Protocol (ICMP) echo request packets to a remote IP address and watches for ICMP responses.

SYNTAX :


ping [options] host

OPTIONS:


-a Make ping audible. Beep each time response is received.
-b Ping a broadcast address.
-c count Stop after sending count ECHO_REQUEST packets. With deadline option, ping waits for count ECHO_REPLY packets, until the timeout expires.
-n Show network addresses as numbers. ping normally displays addresses as host names.
-q Quiet output—nothing is displayed except the summary lines at startup time and when finished.
-i Specify the interval between successive transmissions. The default is one second.
-t Set the IP Time to Live to n seconds.
-w Exit ping after n seconds.

EXAMPLE:


  1. ping google.com -c 3

    Display ECHO_REQUEST 3 times only because we set count for three.
  2. ping -n google.com

    Here the network addresses displays as numbers,normally it displays as hostnames.

Ask Questions

Ask Question