Ad space (banner)
🖥️Linux Lessons
Lesson 20 / 61

Ending a Process with kill

kill is for when "I want to force-quit a program that's gone haywire." kill sends a termination signal to the program with the given process ID (PID).

Use it in the form kill PID. When a normal termination request doesn't work, the -9 option (kill -9 PID) forces it to stop.

Running kill 88 sends a termination signal to the program with process ID 88. You'll need to have already found the PID with the ps command.

A common early mistake is jumping straight to kill -9 and losing data that should have been saved. Trying a plain, normal termination first is the standard approach.

In real work, this is used to restart an unresponsive server process, or to stop a batch job that started running unintentionally.

Linux
Try it (type this into the pseudo terminal)
kill 88

🧑‍💻 You can type this command into the Linux pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)