whatis signal
Signal
Also known as: SIGTERM, SIGKILL, SIGHUP, kill
An asynchronous notification sent to a process, such as SIGTERM (please exit), SIGKILL (exit now), or SIGHUP (reload/hang up).
What Is a Signal in Linux?
Signals are how the kernel and other processes interrupt a program. kill sends SIGTERM by default, which a well-behaved program catches to clean up and exit. SIGKILL (9) cannot be caught and ends the process immediately, without cleanup.
Ctrl+C sends SIGINT and Ctrl+Z sends SIGTSTP. Many daemons reload their configuration on SIGHUP. Shell scripts can respond to signals with trap.
Example
kill -l
kill -HUP $(pidof nginx) Learn more about Signal
- Understanding Process Signals on Linux Signals are how Linux tells a running process to stop, reload, or respond to an event. This guide covers the most important signals, the real difference between SIGTERM and SIGKILL, and how to send and handle them.
- trap and Signal Handling in Shell Scripts Cleaning up temporary files on exit, handling Ctrl+C properly, and why EXIT is the only trap most scripts need.
- Killing Processes in Linux Killing a process on Linux means sending it a signal. Understanding the difference between SIGTERM and SIGKILL, how to find the right process to target, and what to do when a process refuses to die covers everything you need.