Send the normal termination signal to PID 4242 and allow cleanup.
Which command is appropriate?
When no signal is specified, kill sends SIGTERM. It asks the process to exit cleanly; SIGKILL should be a last resort.
Detailed explanation
kill 4242Correct. kill 4242 sends the default SIGTERM.
kill -KILL 4242Incorrect. SIGKILL cannot be caught or cleaned up and is not the normal first choice.
kill -STOP 4242Incorrect. SIGSTOP suspends the process.
kill -CONT 4242Incorrect. SIGCONT resumes a stopped process.
Try it yourself
An example you can run in a temporary verification environment.
kill -l TERMExpected result
SIGTERMのsignal番号または名称Key points
- kill
- SIGTERM
- Graceful termination
Notes
- Environment: Bash/coreutils互換killのsignal表示
- Use a disposable process or test shell when checking lifecycle commands.
- Exact output and option names can vary slightly by distribution and tool version.
Foundation review
Place the operation
Omitting a signal from kill normally selects SIGTERM; SIGKILL should be reserved for processes that will not exit.
Check the side effect
Verify the target PID and ownership before sending any signal.