SIGSEGV Signal Explained (Signal 11)

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

Published October 24, 2026

SIGSEGV (signal 11, segmentation fault) is sent by the kernel when a process accesses memory it is not allowed to, such as a null or freed pointer.

What it does

Default action: Terminate and dump core. It can be caught with a signal handler.

Typically sent by: the kernel on an invalid memory access. List all signals with kill -l.

Signal number and delivery

kill -l | grep SIGSEGV
11) SIGSEGV
kill -11 1234 # or kill -SEGV 1234
(signal delivered to process 1234)

Practical examples

Send it from the shell

kill -11 <PID>
kill -SIGSEGV <PID>
pkill -11 nginx

Handle it in a script

trap 'echo got SIGSEGV; cleanup; exit' SIGSEGV
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.SIGSEGV, 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

  • SIGSEGV is signal 11.
  • Default: Terminate and dump core.
  • Use kill -l to list all signals.

FAQ

How do I debug a segfault?

Enable core dumps and inspect with gdb, or run under valgrind or AddressSanitizer.

How do I list all signals?

Run kill -l.

More Linux articles