The computers they are devices capable of multitasking. It is because of this that they are so essential today. However, many of them are hidden from view of the user.
In that sense, programs what do we install they also usually run and add other processes at the same time. The accumulation of them can lead to our system becoming slow.
Linux offers the ability to access, create or delete them. To know how these actions are carried out in this operating system, we recommend the following post.
What is a process and what happens when we finish or “kill” one?
The operating systems They are software that run multiple processes at the same time. These correspond to both the applications run by the user and others from the same system. In the latter case, many of them they occur in the background. That is, they correspond to executions that support the operation of the OS and are not visible in the interface.
Usually, at the end of a process, the application to which it corresponds stop running. In this sense, if it is one that supports OS operation, maybe the whole computer stop working. On the other hand, if it is one linked to an application executed by the user, it will only close.
How to view tasks in the foreground and background?
The best way to see what processes are running in the operating system Linux it is through the command “”. With it, we can access a list of the process status. You only have to enter it after pressing “Alt + F2”.
Inside it we will find several columns:
- PID corresponds to him process number. This uniquely identifies it and is assigned by the kernel.
- TTY is the value that associates the terminal with the process. Although it can also mean another input device.
- TIME refers to the amount of weather in which the process was running.
- CMD is he Name descriptive that is running.
Learn step by step how to use the Kill command to “kill” or kill processes in Linux
Knowing the values of PID, ending or stopping a process is very simple. However, there are different methods to make it.
Let’s see which ones:
Using the PID number
It is the way more accurate to kill a process.
You must accompany this identification as follows:
- kill -TERM pid
- kill -sigterm pid
- kill -15 pid
For example, to kill the Google Chrome process, follow these steps:
- “Ps -ef | grep Chrome “ with this you will find out the number of PID that corresponds to the application.
- Said command will respond in a manner similar to this “1986? Sl 7:22 /usr/lib/chrome-10.2.3/Chrome “. The first number being the PID.
- Knowing this value, we execute “Kill -15 1986”.
Kill a process using its name
This method may be more suitable, however, if there is more than one instance of said software running, all will be deleted. The steps are very simple. Run the command “Killall” plus the name of the process. For example, to finish Microsoft Word, enter as follows: “Killall winword”.
Using part of your name
In the event that you do not know the full name of the service, you can use “Pkill” and then part of the name. We must warn you that if there are two or more that share the word entered, all of them will be deleted. Login “Pkill part_name”. Continuing with the previous example “Pkill word”.
Using the mouse
One more way to end a process is helping us with the cursor and the click. It is important to clarify that it’s not about closing a window, but in addition to that, it will eliminate everything that it is running in the background. The corresponding command and the steps you must follow are “Xkill” and then click on the window you want to kill.