# Terminal stuck? Do not close the window

> Most stuck states have a one key exit. Closing the window hangs up every job running in it.

Source: https://fullbytedeveloper.com/blog/term-stuck
Published here: 2026-11-18

Terminal stuck? Do not close the window. Closing it hangs up every job running in it. Most stuck states have a one key exit.

## The fix block

1. **Output stopped (you hit Ctrl+S)**: press Ctrl+Q

2. **SSH session frozen**: press Enter, then ~ then .

3. **Prompt turned into > (zsh: dquote>)**: the shell wants you to finish the command, often an open quote. Press Ctrl+C

4. **Typing shows nothing or text is garbled**: type `reset` and Enter, even if you cannot see it (if Enter does nothing: Ctrl+J, reset, Ctrl+J)

5. **Ctrl+Z and the program vanished**: it is stopped, not gone. Type `jobs` to see it, `fg` to bring it back

6. **Stuck in a man page or git log**: press q

## Notes

Fixes 3, 4 and 5 are confirmed on Mac (bash 3.2, zsh 5.9). Ctrl+Q works while flow control (ixon) is on.

Send this to the friend who closes the whole terminal every time vim or less traps them.

## Sources

1. [Linux man: termios](https://man7.org/linux/man-pages/man3/termios.3.html)
2. [OpenBSD man: ssh](https://man.openbsd.org/ssh)
3. [Linux man: reset](https://man7.org/linux/man-pages/man1/reset.1.html)
4. [Linux man: bash](https://man7.org/linux/man-pages/man1/bash.1.html)
5. [Zsh docs: PS2 parameter](https://zsh.sourceforge.io/Doc/Release/Parameters.html)
6. [Linux man: less](https://man7.org/linux/man-pages/man1/less.1.html)
