logo

Linux - Signals

Last Updated: 2023-02-05

List all Linux signals:

$ trap -l

e.g.

  • 1 - SIGHUP: connection to a remote host is dropped (SSH).
  • 2 - SIGINT: interrupt signal, Ctrl-C.
  • 3 - SIGQUIT: Ctrl-D.
  • 8 - SIGFPE: illegal math operation, like division by zero.
  • 9 - SIGKILL: cannot catch it or ignore it. The process is terminated immediately.
  • 11 - SIGSEGV: segment fault.
  • 15 - SIGTERM: similar to SIGKILL but can be trapped and the process can run its clean-up processes before closing down. The default signal by kill command.