SIGTSTP Signal Explained (Signal 20)

What the Linux SIGTSTP signal does and when it's used.

Published October 24, 2026

SIGTSTP (signal 20) is the terminal stop signal sent by Ctrl+Z. It suspends the foreground job so you can resume it later with fg or bg. Unlike SIGSTOP it can be caught.

What it does

Default action: Stop (suspend). It can be caught with a signal handler.

Typically sent by: Ctrl+Z. List all signals with kill -l.

Signal number and delivery

kill -l | grep SIGTSTP
20) SIGTSTP
kill -20 1234 # or kill -TSTP 1234
(signal delivered to process 1234)

Practical examples

Send it from the shell

kill -20 <PID>
kill -SIGTSTP <PID>
pkill -20 nginx

Handle it in a script

trap 'echo got SIGTSTP; cleanup; exit' SIGTSTP
while true; do sleep 1; done

Handle it in code

import signal, sys
def handler(sig, frame):
    print('received', sig)
    sys.exit(0)
signal.signal(signal.SIGTSTP, handler)

Common mistakes

  • Using kill -9 before trying SIGTERM.
  • Forgetting to find the right PID (ps aux | grep, pgrep).
  • Not handling signals in long-running services.

Key takeaways

  • SIGTSTP is signal 20.
  • Default: Stop (suspend).
  • Use kill -l to list all signals.

FAQ

How do I resume after Ctrl+Z?

Run fg to bring it back or bg to continue it in the background.

How do I list all signals?

Run kill -l.

More Linux articles