Kolam Ayer MakersLinux Foundations

Signal

Core Idea

A signal is a notification sent to a process to interrupt it, stop it, continue it, terminate it, or report an event.

Signals You Meet Early

Signal Common Trigger Meaning
SIGINT Ctrl-C Interrupt the foreground process.
SIGTSTP Ctrl-Z Stop the foreground process.
SIGCONT fg or bg Continue a stopped process.
SIGTERM kill PID default Ask a process to terminate.
SIGKILL kill -9 PID Force termination; cannot be handled. Use rarely.

Commands To Try

sleep 60
# press Ctrl-C
sleep 60
# press Ctrl-Z
jobs
fg

Kill Safely

ps -u "$USER" -o pid,comm,args
kill PID

Use ps first. Kill only processes you understand and own.

Common Confusions

Proof Check

Start sleep 60, stop it with Ctrl-Z, show it with jobs, continue it with fg, then interrupt it with Ctrl-C.

Docs Pointers