---
title: "How To Stop Ping: Ctrl+C on Windows, Mac and Linux | DeviceTests"
description: "Press Ctrl+C to stop a running ping on Windows, macOS or Linux. See the stats without stopping it, and make ping stop on its own with -n or -c."
url: https://devicetests.com/stop-ping-command
language: en
---

# How To Stop a Ping Command Without Closing the Terminal Window

By Carlos Bradley · Updated November 4, 2026 · First published July 25, 2023

Short answer

Click in the window where ping is running and press Ctrl + C. This works on Windows, macOS and Linux. Ping stops, prints a short summary and gives you the prompt back.

## Stop ping with Ctrl + C

1. Click inside the window where ping is running.
2. Hold down Ctrl. On a Mac, this is the Control key, not Command.
3. Press C.

Ping stops at once. It shows how many packets were sent, received and lost, and the shortest, average and longest reply times. The window stays open for your next command.

## Why ping keeps running

| System | A plain `ping` |
| - | - |
| Windows | Sends 4 pings, then stops. Only `ping -t` keeps going. |
| macOS | Keeps going until you stop it |
| Linux | Keeps going until you stop it |

So on Windows, a ping that never ends was started with `-t`. On macOS and Linux, ping runs until you stop it, unless you give it a count or a time limit.

## Make ping stop on its own

Give ping a count, and it stops after that many pings.

### Windows

Use `-n` and a number:

```
ping -n 10 example.com
```

Windows has no total time limit for ping. Take care: `-t` means “keep going until stopped”, and `-w` is how long to wait for each reply, in milliseconds.

### Mac

Use `-c` and a number:

```
ping -c 10 example.com
```

Or set a time limit in seconds with `-t`. Ping stops when the time runs out:

```
ping -t 30 example.com
```

### Linux

Use `-c` and a number:

```
ping -c 10 example.com
```

Or set a time limit in seconds with `-w`. Ping stops when the time runs out:

```
ping -w 30 example.com
```

## See the results without stopping ping

You can get the numbers so far while a long ping keeps running.

| System | Press | What happens |
| - | - | - |
| Windows (`ping -t`) | Ctrl + Break | Shows the statistics and keeps going |
| macOS | Control + T | Shows the statistics and keeps going |
| Linux | Ctrl + \\ | Shows a short line of statistics and keeps going |

Many laptops have no Break key. Your laptop maker’s keyboard guide shows which key combination works as Break.

## Test your ping without a terminal

Test it now

Ping test

It shows your ping and jitter to our server, then stops by itself. It tells you if your connection is steady, not where a delay comes from.

[Open the ping test](https://devicetests.com/ping-test)

If your ping is high or jumps around, see [why is my ping so high](https://devicetests.com/high-ping-and-packet-loss) for the fixes.

## Questions people ask

**Ctrl + C doesn't stop ping. What else can I try?**

Click inside the ping window first, so it’s the active one, then press Ctrl + C again. Closing the window always ends the ping.

**Does closing the window stop ping?**

Yes. Closing the window ends the ping at once, but you lose the summary. Ctrl + C stops it and keeps the summary on screen.

**How do I run ping forever on Windows?**

Type `ping -t` and the address, for example `ping -t example.com`. It keeps sending pings until you press Ctrl + C.

## Sources

- [Microsoft Learn: ping (Windows commands)](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/ping)
- [Linux man page: ping(8), iputils](https://man7.org/linux/man-pages/man8/ping.8.html)
- [FreeBSD man page: ping(8), the BSD ping that macOS uses (SIGINFO)](https://man.freebsd.org/cgi/man.cgi?query=ping\&sektion=8)
- [SS64: macOS ping options](https://ss64.com/mac/ping.html)

## Test it yourself

Check your own device with a free test. It runs in your web browser.

- [Ping test](https://devicetests.com/ping-test): Measure how fast your connection responds.
- [Packet loss test](https://devicetests.com/packet-loss-test): Check whether your connection drops data.
- [Bufferbloat test](https://devicetests.com/bufferbloat-test): Check whether your internet lags when it is busy.
