A process is a series of steps that must be followed to complete a particular task or we can say that it is a program that performs some operation. Multiple processes are frequently running simultaneously where one process is linked to a single program, and each process has its own set of components that perform specific tasks. A process has its own set of characteristics: Process Number (PID), Process Name, Unique Process Number, Process State, Process Origin, and Time, which each process takes.
When you execute an application, it starts running a background process. You can kill the process associated with this application by forcing the application to be closed. The next section will demonstrate how to find and kill a process using the Ubuntu terminal. So let’s get started!
Ubuntu has a utility called “ ps “ for displaying information associated with the processes on a system, which is an acronym for “Process Status“. The ps command is utilized for displaying a list of presently running processes, their PIDs, and other information. Following is the list of process attributes that will be fetched by executing the “ps” command:
Now, write out the below-given command to find a process and its related information in the Ubuntu terminal:
The execution of this command will show you the following output:
On your terminal, now you have all information related to processes. Search for a specific process. To kill a process, utilize its process ID in the “kill” command as follows:
In the above-given command, “-9” sends the kill signal “SIGKILL” to stop the process immediately. Now, we will try to kill the process of having “2051” PID in the following way:
The error-free output declares that the process having PID=2051 is successfully killed. To confirm the killed operation, again execute the “ps” command:
You can see that the killed process with PID 2051 is not in the retrieve processes list:
You can also utilize the “kill” command for killing multiple processes at once. For instance, we want to kill the processes with PIDs: 1770, 1772, 1774, which are also highlighted in the below-given image:
To kill these multiple processes simultaneously, in the “kill” command, write out their PIDs in the following way:
All done!
Using the Ubuntu terminal to kill the process is simple, but beginners may not feel comfortable doing so. However, an Ubuntu user can utilize the System Monitor application for this purpose. The System Monitor operates similarly to the Task Manager on the Windows system. It displays a list of all active processes on your computer and real-time information about RAM, CPU, and disk consumption. It also enables you to kill any process software that refuses to respond.
If you do not have a System monitor in your Ubuntu system, then write out the below-given command for its installation:
After completing the installation, search “System Monitor” in the application’s search bar:
Here, you can see the list of active processes on your system. Find the process that is not responding, or you want to kill by scrolling down the list:
You can kill a specific process by right-clicking on it, then from the context menu, select the “kill” option or press “CTRL+K”:
Confirm this operation by clicking the “Kill Process” button, highlighted in the below-given image:
That’s it. Your selected process is killed in your Ubuntu system.
Ubuntu provides you various tools to stay in control even when the running process stops responding. You can kill an unresponsive process using the Ubuntu terminal and System monitor. This article showed you how to find and kill a process in Ubuntu using the Ubuntu terminal and System monitor. According to our experience, using the terminal for killing a process is a better choice because GUI-based tools may not show the information related to running a hidden process.
Microsoft Edge is now available for Ubuntu. In this guide, I’ll walk you through the…
Our latest Canonical website rebrand did not just bring the new Vanilla-based frontend, it also…
At Canonical, the work of our teams is strongly embedded in the open source principles…
Welcome to the Ubuntu Weekly Newsletter, Issue 873 for the week of December 29, 2024…
Have WiFi troubles on your Ubuntu 24.04 system? Don’t worry, you’re not alone. WiFi problems…
The following is a post from Mark Shuttleworth on the Ubuntu Discourse instance. For more…