Linux Ping

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

Linux ping

The ping command stands for (Packet INternet Groper). It checks the connectivity between two nodes that is whether a server is reachable or not.

ping command keep executing and sends the packet until you interrupt.

To stop from execution press ctrl + c.


ping using DNS

Syntax:

  1. ping <destination>  

Example:

ping javatpoint.com 

Linux ping1


ping using IP address

You can use IP address also with ping command.

Example:

  1. ping 2.2.2.2  

Linux ping2


ping to limit the packets

To limit the ping packet without using ctrl + c use option c followed by the number of packet to be send.

Syntax:

  1. ping -c <number> <destination>

Example:

  1. ping -c 5 javatpoint.com  

Linux ping3

Look at the above snapshot, packets are limited to 5 without pressing keys.