Categories
Linux Tutorial Series

Linux Tutorial Series – 103 – The kill command

Here is the video version, if you prefer it:

Let’s talk about how to kill a process. That means to end a process; to terminate it. You can do this with the kill command.

Usage of kill is this:

kill <PID>

where PID is the process ID of the process you want to kill (you can attain this ID using ps with its various options). By default, kill sends a TERM signal to the process. (Ward, 2014)⁠ You don’t really need to know any other signals. If the process doesn’t terminate after that, you can try using

kill -KILL <PID>

which sends the KILL signal, but use it as the last resort – it ends the process in an ugly way.

Hope you learned something new!

References

Ward, B. (2014). How Linux Works: What Every Superuser Should Know (2nd ed.). No Starch Press. Pages 31-32

NewsletterUpdates on interesting things I am doing

Subscribe to my newsletter to keep abreast of the interesting things I'm doing. I will send you the newsletter only when there is something interesting. This means 0% spam, 100% interesting content.

Leave a Reply

Your email address will not be published. Required fields are marked *