> For the complete documentation index, see [llms.txt](https://til.devjugal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.devjugal.com/linux/ping-over-tcp.md).

# Ping over TCP

`ping` can't do TCP ping so in order to run ping for TCP we can use `tcpping`.

## Installation

Firstly we have to make sure `tcptraceroute` is installed by running -

```bash
apt-get install -y tcptraceroute
```

Then to install tcpping, run -

```bash
wget http://www.vdberg.org/~richard/tcpping -O /usr/bin/tcping
chmod 755 /usr/bin/tcping
```

***Note:*** I am saving `tcpping` as `tcping` here

### Example

```bash
jungle@DESKTOP-B73I3A0:~$ tcping -x 5 google.com
seq 0: tcp response from del11s07-in-f14.1e100.net (216.58.200.206) [open]  60.454 ms
seq 1: tcp response from del11s07-in-f14.1e100.net (216.58.200.206) [open]  78.215 ms
seq 2: tcp response from del11s07-in-f14.1e100.net (216.58.200.206) [open]  55.457 ms
seq 3: tcp response from del11s07-in-f14.1e100.net (216.58.200.206) [open]  53.049 ms
seq 4: tcp response from del11s07-in-f14.1e100.net (216.58.200.206) [open]  48.375 ms
```

***Source:*** [***GitHub Gist***](https://gist.github.com/cnDelbert/5fb06ccf10c19dbce3a7)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://til.devjugal.com/linux/ping-over-tcp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
