1. Home
  2. Linux
  3. Kill a process linux

How to kill a process in Linux

If you’re new to Linux, you may want to know how to kill a problematic process. There are many ways to kill a process in Linux. This guide will go over several ways you can kill running processes in Linux.

Warning: killing processes on Linux can be dangerous. You should only stop a process from running if you know what it does. Killing random system processes may break your system and corrupt data.

Gnome system monitor

Most Linux desktops are using the Gnome Shell desktop environment. If you need a quick way to kill a process on your Linux system, you can use the system monitor included in Gnome.

To access the Gnome system monitor, press the Win key on the keyboard. Pressing this button will open up overview mode on the desktop. Once inside of overview mode, type in “System Monitor” into the search bar.

After entering your search term, click on the app with “System Monitor” in its name to launch the system monitor app. Then, follow the step-by-step instructions below to kill a process with it on your Linux system.

Step 1: Upon launching the Gnome system monitor application, you should see a list of running processes. If you do not, click on the “Processes” tab to access it.

Inside of the process tab, scroll with the mouse to locate the app you are trying to kill. Alternatively, click on the search button and type in the name of the process.

Step 2: When you’ve located the process you’re trying to kill, right-click on it with the mouse. Select the “Kill” option in the right-click menu to kill the process.

Step 3: Once you select “Kill” on the process you wish to kill on your Linux system, you will get a pop-up notification. Select the “Kill Process” button to confirm you want to kill the process.

KSysGuard

If you’re using Kubuntu, Fedora KDE Spin, or another Linux distribution with the KDE Plasma desktop, you’ll be able to use KSysGuard to kill processes. To start, you’ll need to open up the KDE application menu.

Launch the KDE application menu on the desktop by pressing the Win key on the keyboard. Then, type in “KSysGuard” in the search box. Allow the search box to load the results.

Once the results are loaded up, look for the “KSysGuard” application and click on it to launch it. When KSysGuard is open, you should see the “Process Table” tab. If not, click on “Process Table” to access the processes in KSysGuard.

With the “Process Table” loaded in KSysGuard, follow the step-by-step instructions below to kill a process on your Linux system.

Step 1: Look through the “Process Table” area for the process you wish to kill. Alternatively, search for a process by clicking on “Quick search” and typing in keywords.

Step 2: Once you’ve located the process you wish to kill in KSysGuard, right-click on it and select the “send signal” button. Then, select the “KILL” option to kill the process.

Step 3: The app will instantly close when you select “KILL” in KSysGuard. From here, close KSysGuard. Or, repeat steps 1 and 2 to kill more processes on your Linux system.

Htop

Htop is a graphical process manager for the terminal. It works similar to Gnome System Monitor and KSysGuard. However, you must first install it to your computer to use it. To do that, launch a terminal window.

Unsure about how to open up a terminal window on the Linux desktop? Press Ctrl + Alt + T on the keyboard. Or search for “Terminal” and launch it that way. With the terminal open, install Htop on your computer.

Ubuntu

sudo apt install htop

Debian

sudo apt-get install htop

Arch Linux

sudo pacman -S htop

Fedora

sudo dnf install htop

openSUSE

sudo zypper install htop

After installing the Htop application, open it up by typing htop into the terminal.

htop

Once inside of Htop, press the F3 button on the keyboard. Pressing this button will open the search function. From here, type in the name of the process you wish to kill.

After locating the process, press the F9 button to open the “Kill” menu. Then, select “SIGKILL” to kill the process.

Pidof and kill

A quick and dirty way to kill a process is to search for the active process PID (process ID) and kill it with the kill command. To start, open up a terminal window by pressing Ctrl + Alt + T on the keyboard. Or, open up a terminal by searching for “Terminal” in the app menu.

With the terminal window open and ready to use, enter the pidof command followed by the program’s name. For example:

pidof discord

After entering the command above, pidof will spit out PID. Take this number and plug it into the kill command to kill the process on your computer.

sudo kill -9 PROCESS_ID_NUMBER