cheat.sheets:ping
# ping
# Send ICMP echo requests to network hosts.
# Basic usage of ping to check connectivity to a host
ping hostname_or_IP_address
# Specify the number of echo requests to send
ping -c 4 hostname_or_IP_address
# Set the interval between sending each packet in seconds
ping -i 2 hostname_or_IP_address
# Flood ping, sending requests as fast as possible (requires root)
ping -f hostname_or_IP_address
# Ping with a specified packet size in bytes
ping -s 100 hostname_or_IP_address
# Set time to live to control the number of hops
ping -t 64 hostname_or_IP_address
# Use IPv4 explicitly (equivalent to ping)
ping -4 hostname_or_IP_address
# Use IPv6 explicitly
ping -6 ipv6_address
# Display the version of the ping command
ping -V
cheat:ping
---
tags: [ networking ]
---
# To ping <host> with 15 packets:
ping -c 15 <host>
# To ping <host> with 15 packets, one every .5 seconds:
ping -c 15 -i .5 <host>
# To test if a packet size of 1500 bytes is supported (to check the MTU for example):
ping -s 1500 -c 10 -M do <host>
tldr:ping
# ping
# Send ICMP ECHO_REQUEST packets to network hosts.
# More information: <https://manned.org/ping>.
# Ping host:
ping host
# Ping a host only a specific number of times:
ping -c count host
# Ping host, specifying the interval in seconds between requests (default is 1 second):
ping -i seconds host
# Ping host without trying to lookup symbolic names for addresses:
ping -n host
# Ping host and ring the bell when a packet is received (if your terminal supports it):
ping -a host
# Also display a message if no response was received:
ping -O host
$
cheat.sh