User Tools

Site Tools


The ping command in Linux and Unix-like systems like FreeBSD is used to check the connectivity between a source host and a destination host on a network. It sends Internet Control Message Protocol (ICMP) echo request packets to the host and listens for ICMP echo reply packets in return.

Here are a few basic examples of how the ping command can be used in Linux and FreeBSD:

  1. Check connectivity to a specific host: ping hostname
  2. Send a specified number of pings: ping -c count hostname
  3. Specify the interval in seconds between pings: ping -i interval hostname

The ping command without any options will send an infinite number of echo request packets to the specified host, and will display the number of packets sent, received, and lost, and the round trip time of each packet. The -c option can be used to specify the number of pings to send. The -i option can be used to specify the interval between pings.

It's also possible to use the ping command to ping a specific IP address or URL, for example: ping or ping

Please note that some host's firewalls may block ping requests, so it so it may be necessary to check with the network administrator or try other methods to verify connectivity. It's also worth noting that some networks or firewalls may block or limit ICMP traffic, in that case, the ping may not work.

Ping command is very useful for troubleshooting the network connection, it's widely used by network and system administrators to check if a host is reachable and to measure the round-trip time for packets to travel from the source host to the destination host and back.

It's also possible to use the ping command with the traceroute command to trace the route packets take from the source host to the destination host. This can be useful for identifying network issues or routing problems along the way.

unix_commands/ping.txt ยท Last modified: 2023/01/18 14:04 by admin

CIFNet is a leading hosting solution provider, offering a wide range of services including IP bandwidth, co-location, VMware and KVM hosting.
Host Your Site with CIFNet!