How To Kill a Process in the Linux terminal

Process management via the Linux terminal
(Image credit: Pexels / OpenClipArt)

In this how-to we’ll look at various ways of using the terminal emulator to identify processes and how to kill them. A process can be an application or script running on your Linux machine. Sometimes a process can crash or become a memory hog and this is when we need to step in and “kill” the process. As ever, there are a multitude of tools that we can use to do this. We will use a variety of approaches and tools to identify and kill the processes.

While you become accustomed to these commands, it’s important to take care that you don’t kill a process which results in you losing work. Wherever possible use an application that isn’t currently in use on your machine as an example of a process to kill.

Latest Videos FromTom's Hardware
Jo Hinchliffe
Contributing Writer

Jo Hinchliffe is a UK-based freelance writer for Tom's Hardware US. His writing is focused on tutorials for the Linux command line. From PCBs to rowing boats to rockets, Jo tries wherever possible to integrate open source hardware and software into his projects. As such he is a keen Linux user, has authored a book on FreeCAD the open source 3D modeling software, and has published designs and tutorials across a wide range of makes.

With contributions from
  • Elliot Foley
    Neat article. Unfortunately, I already knew all of this. I wish you had also mentioned EarlyOOM, which is a pretty neat tool I found that automatically kills the highest RAM-eating process if your total usage exceeds a threshold certain threshold. Nice for when you're actually running out of RAM so badly that your desktop environment is freezing up. Helpful guide for beginners though!
    Reply