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)