Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever I want to quit something in Cygwin, Ctrl + Z usually does the trick.

What's the equivalent in the command prompt?

share|improve this question
^c (ctrl+c) i believe, but its been awhile and i am not 100% sure – Xantec Nov 23 '10 at 17:11
it's not working, usually in cygwin when I do git diff ctrl+z would allow me to quickly exit a large diff, but in DOS ctrl+z and ctrl+c both do nothing. – erikvold Nov 23 '10 at 17:53
up vote 10 down vote accepted

Depends on what you mean by "quit something"; within Windows cmd:

Ctrl+Z sends the EOF character, which could terminate a process if you're providing input, but otherwise will probably do nothing.

Ctrl+C normally sends SIGINT to the foreground process, which should terminate it, but programs can respond however they like - ie, they can catch the signal but then ignore it. The command can also be remapped to other jobs (such that for a specific program it doesn't really send a signal) or ignored entirely.

Ctrl+Break always sends SIGBREAK, which again should terminate the process, but unlike Ctrl+C cannot be remapped, but can still be ignored. This is probably what you need.

Here's a source: MSDN article: CTRL+C and CTRL+BREAK Signals.

share|improve this answer

It's Ctrl-C, if you want to cancel a long DOS command (e.g. C:\>dir /s)

share|improve this answer
IIRC, Ctrl-C is only processed during I/O operations. Would not interrupt a task that doesn't happen to enter a DOS I/O subroutine. – Brian Knoblauch Nov 23 '10 at 19:38
@Brian: yes, you're probably right. I think DMA57361's answer is correct - Ctrl-Break is probably what he wants. – gkrogers Nov 24 '10 at 10:29

Ctrl-Z is a DOS/Windows convention, not a Cygwin convention. Try the same keystroke.

share|improve this answer
As a honored member of Super User, please try to elaborate on your answer to provide more detail. – KronoS Jul 13 '12 at 9:09


share|improve this answer
Mind filling this out a bit with exactly what it does? – soandos Jul 23 '12 at 2:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .