0
0
Linux CLIscripting~5 mins

kill and signal types in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the kill command do in Linux?
The kill command sends a signal to a process, usually to stop or control it. It can ask a process to stop gently or force it to quit.
Click to reveal answer
beginner
What is the difference between SIGTERM and SIGKILL signals?
SIGTERM politely asks a process to stop, allowing it to clean up. SIGKILL forces the process to stop immediately without cleanup.
Click to reveal answer
beginner
How do you send a SIGINT signal using the kill command?
Use kill -2 <pid> or kill -SIGINT <pid>. SIGINT is like pressing Ctrl+C to interrupt a process.
Click to reveal answer
beginner
What signal number is usually used to force kill a process?
Signal number 9 (SIGKILL) is used to force kill a process immediately.
Click to reveal answer
beginner
Why should you prefer SIGTERM over SIGKILL when stopping a process?
SIGTERM lets the process close files and save data safely. SIGKILL stops it instantly, which might cause data loss.
Click to reveal answer
Which signal number corresponds to SIGKILL?
A9
B15
C2
D1
What does the kill -15 <pid> command do?
ASends SIGHUP to reload the process
BSends SIGKILL to force stop the process
CSends SIGINT to interrupt the process
DSends SIGTERM to politely stop the process
Which signal is sent when you press Ctrl+C in the terminal?
ASIGTERM
BSIGINT
CSIGKILL
DSIGSTOP
If a process ignores SIGTERM, which signal should you use next?
ASIGKILL
BSIGINT
CSIGHUP
DSIGSTOP
What is the purpose of the SIGHUP signal?
ATerminate the process immediately
BPause the process
CReload configuration or restart the process
DIgnore the process
Explain how the kill command works and name three common signals it can send.
Think about how you stop or control a process using signals.
You got /4 concepts.
    Describe the difference between SIGTERM and SIGKILL and why you might choose one over the other.
    Consider what happens to a process when it receives each signal.
    You got /4 concepts.