Linux · Systems fluency

How do process signals work, and when do you use which?

MediumsignalssigtermsigkillUpdated Oct 2026
Quiz this track

Short answer

Signals are asynchronous notifications delivered to a process. SIGTERM asks a process to shut down gracefully, SIGKILL forces termination, and SIGHUP often triggers a configuration reload or follows a terminal hangup.

A process can install handlers for most signals, ignore some, or use the default action. SIGKILL and SIGSTOP cannot be caught or ignored, so they are reserved for cases where graceful control has failed.

sh
kill -TERM 1234
kill -HUP 1234
kill -9 1234
Escalate only after a graceful signal has had time to work. SIGKILL gives the process no chance to flush buffers or remove lock files.

Signals you will meet

  • SIGTERM: polite termination request, the normal first choice
  • SIGINT: interrupt from Ctrl-C in a terminal
  • SIGHUP: terminal hangup, commonly reused for reload
  • SIGKILL: immediate uncatchable termination
  • SIGSTOP and SIGCONT: pause and resume without handling

Service managers send SIGTERM and wait for a timeout before sending SIGKILL. A service that ignores SIGTERM will delay restarts and may lose in-flight work. Well-behaved daemons stop accepting new requests, finish or drain existing ones, and exit.

kill -9 is not a faster restart strategy. It can leave shared memory, lock files, or partially written data behind, and it hides the bug that prevented graceful shutdown.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1Why should SIGTERM be tried before SIGKILL?
  2. 2What happens when a process ignores SIGTERM?
  3. 3How does systemd decide when to send SIGKILL?
  4. 4What is the difference between SIGINT and SIGTERM?

Say it in the interview

Signals are asynchronous notifications to a process. SIGTERM is the normal shutdown request because the application can clean up. SIGKILL cannot be caught, so I use it only after a timeout. SIGHUP usually means hangup, but many daemons use it to reload configuration, and a service that ignores SIGTERM will slow every restart and can lose data.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Linux mock interview and get scored feedback on depth, clarity and confidence.