How to Use the ping Command

Updated on

The ping command can be used to check network connections and find the IP addresses of hostnames.

Open a terminal and type this command:

ping example.com

You should see output something like this. (Press ctrl+c to stop the command.)

PING example.com (93.184.216.34): 56 data bytes
64 bytes from 93.184.216.34: icmp_seq=0 ttl=58 time=57.566 ms
64 bytes from 93.184.216.34: icmp_seq=1 ttl=58 time=58.044 ms
64 bytes from 93.184.216.34: icmp_seq=2 ttl=58 time=56.931 ms
64 bytes from 93.184.216.34: icmp_seq=3 ttl=58 time=44.875 ms

The IP address for the domain (example.com) is listed in the output.

  • icmp_seq refers to the packet number.
  • ttl means “time to live” and has information about the number of hops the ping took.
  • time is how long the round-trip took.

For the purposes of Web development and SEO, the most likely usage of ping is to check the IP address of a domain.

You can learn more about it by typing man ping in a terminal or read through this guide.

Tagged with:ProgrammingShell ScriptingLinux

Feedback and Comments

What did you think about this page? Do you have any questions, or is there anything that could be improved? You can leave a comment after clicking on an icon below.