In any operating system, the programs and applications running are known as processes. Each running task or process uses the resources provided by the system. These include the RAM, processor, and a permanent storage device such as an SSD, etc. These processes usually function properly, but like any other process in the world, they can sometimes malfunction. They might stop working or cause problems to other correctly working processes. In other cases, too many processes running in the background utilize a lot of resources and end up slowing down the whole system as a result. In such situations, it is best to terminate the processes that are causing these interferences. There are different ways to end an unresponsive program for different operating systems. You may be familiar with the Task Manager for Windows. Linux provides us two different ways we can ‘kill’ a process. One is the kill command we can use on the Terminal. The other is the System Monitor. If you are using Linux and are in a sticky situation with one of your applications, this article will guide how to kill a process on Linux. So, buckle up and get ready!
The Kill Command.
As you know, the Terminal can be used to do anything with your computer. To end a process, there is a very convenient kill command. To learn how to kill a process on Linux using the kill command, we must first understand its syntax. The syntax for the command is: The two parts of the syntax need explanation.
1. Signal.
The Signal is a number representing a signal name. Kill performs different tasks according to the signal you provide it. There are a total of 64 signals associated with kill, and to view all of them use the following command: In the above image, you can see the 64 signals. From these 64 there are only two signals that are used commonly with kill: Moving forward, there are three ways you can specify a signal: This is all the information you needed to know about the signals related to kill.
2. PID.
The Process Identification Number (PID) is the identification number given to each process in Linux. The knowledge of PID of the given process is important, without it, you can’t kill the process. There are two commands that you can use for this purpose. For example, we will use both these commands to know the PID for the currently running Mozilla Firefox.
1. Kill a Process Using Terminal.
With the signal and PID parts of the syntax explained, it is fair to say that you now have learned all the basics related to the kill command. You should now test these basics. The following steps will guide you on how to kill a process on Linux using the terminal: These are the steps you have to follow to kill a process using the Terminal successfully. You can use any commands listed above according to your liking, you will get the same result. Now we move on to the second method of killing a process in Linux.
2. Kill a Process Using System Monitor.
The System Monitor is the Linux version of Task Manager, which is affiliated with Windows. This application lists all of the currently running processes on your Linux system, similar to what the Task Manager does on Windows. Using the System Monitor, we can easily end the malfunctioning process using a single click. There is no need to find the PID of that task, nor is it required to type the kill command. So, to kill a process using the System Monitor, follow these steps: There are various instances where a user can get stuck with a program malfunction using a computer. It is, after all, not a perfect machine. But then again, there is nothing in this world that can be called outright perfect. This article addressed this problem and attempted to guide you on how to kill a process on Linux. Facing such problems is very common, no matter which device or operating system you use. The great thing is, the operating systems have given you methods to manually override the malfunctioning programs. The kill command and the system monitor are the two ways you can end processes in Linux. Speaking of Linux, if you want to perform a reverse DNS lookup on the operating system, this article should guide you thoroughly. If this guide helped you, please share it. 🙂