Linux interview question

What is the difference between kill, kill -9 and a graceful shutdown?

Comparison Asked in DevOps Engineer · Site Reliability Engineer (SRE) interviews

Members can save this page, take notes and track progress. See membership · Sign in

Summary

kill PID sends SIGTERM, which a program can catch to finish work and exit cleanly. kill -9 sends SIGKILL, which can't be caught: the process stops immediately, losing in-flight work and leaving temporary files, locks and half-written data behind. Always try SIGTERM first and give it time.

Keep reading with a membership

The full answer with examples, key points and comparisons is part of the membership, along with every other interview answer, progress tracking and Daily Review. Most-asked answers stay free to read.

See plans and free trial Already a member? Sign in

More Linux questions

← All Linux questions

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake