2014-02-07 20:15:16 +00:00
|
|
|
# ping
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Send ICMP ECHO_REQUEST packets to network hosts.
|
2014-02-07 20:15:16 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Ping host:
|
2014-02-07 20:15:16 +00:00
|
|
|
|
|
|
|
`ping {{host}}`
|
|
|
|
|
2016-01-16 09:56:13 +00:00
|
|
|
- Ping a host only a specific number of times:
|
2014-02-07 20:15:16 +00:00
|
|
|
|
2016-01-16 09:56:13 +00:00
|
|
|
`ping -c {{count}} {{host}}`
|
2014-02-07 20:15:16 +00:00
|
|
|
|
2016-01-16 09:56:13 +00:00
|
|
|
- Ping host, specifying the interval in seconds between requests (default is 1 second):
|
2014-02-07 20:15:16 +00:00
|
|
|
|
2016-01-16 09:56:13 +00:00
|
|
|
`ping -i {{seconds}} {{host}}`
|
2014-07-23 16:50:33 +01:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Ping host without trying to lookup symbolic names for addresses:
|
2014-07-23 16:50:33 +01:00
|
|
|
|
|
|
|
`ping -n {{host}}`
|
2016-09-23 15:47:43 +01:00
|
|
|
|
|
|
|
- Ping host and ring the bell when a packet is received (if your terminal supports it):
|
|
|
|
|
|
|
|
`ping -a {{host}}`
|
2018-07-19 13:56:58 +01:00
|
|
|
|
|
|
|
- Also display a message if no response was received:
|
|
|
|
|
|
|
|
`ping -O {{host}}`
|