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?✗ Incorrect
SIGKILL is signal number 9, used to forcefully stop a process.What does the
kill -15 <pid> command do?✗ Incorrect
kill -15 sends SIGTERM, which politely asks the process to stop.Which signal is sent when you press Ctrl+C in the terminal?
✗ Incorrect
Ctrl+C sends
SIGINT to interrupt the running process.If a process ignores
SIGTERM, which signal should you use next?✗ Incorrect
If
SIGTERM is ignored, SIGKILL (signal 9) forces the process to stop.What is the purpose of the
SIGHUP signal?✗ Incorrect
SIGHUP usually tells a process to reload its configuration or restart.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.