The ping command is one of the most common used commands in the IT field. After taking a walk in Brooklyn New York City I decided to put together some ping command examples to remember.

Basic ping command

The most basic ping command example would be to just ping

Ping command example

You can also test your localhost TCP/IP with any of these two ping commands:

# ping localhost
# ping

Other important ping command examples

Linux by default sends continuous pings unlike Windows that sends four. One ping command option I was not aware is the -a which sends an audible ‘cue’ with each ping when is a successful one:

# ping -a

You can also adjust the number of pings using the -c option very easy. This example will only send eight pings:

# ping -c 8

If you don’t need to see the output of each ping you can use the -q option to summarize the results. This ping command example will show you if ping was successful at sending 3 packets:

Ping command using the -q option

A Little More Advance ping Example

You can change the size of the ping packet sent. It is usually 28 bytes. So, to send 128 bytes you will do:

# ping -s 100

You can also limit the total number of hops -routers- ping will pass by configuring the TTL(Time To Live) option:

# ping -t 10

There are many more ping command options. You can find them by checking the man pages.

Contact me if you have any questions. Also, remember to visit my shop and if you like my T-Shirts and coffee mugs designs grab one. Thanks!

Leave a comment

Your email address will not be published. Required fields are marked *