There are likely to be times when you will encounter problems with non-compliant applications and procedures. Sometimes closing and even restarting does not work. In this case, the only option is to restart the system, which takes time and is sometimes unacceptable if a number of critical services are running on the servers. There are several other useful ways to bypass this problem by interrupting the process without restarting the system. This article explains the methods that can be used to destroy a process in the Linux operating system.
Pay attention: We have explained the procedure mentioned in this article about Ubuntu 20.04 LTS. In earlier versions of Ubuntu, you can execute more or less the same commands and procedures,
Using the system monitor
The GNOME system monitor is a GUI embedded utility that can be used to destroy the process in the Linux operating system. This allows you to interrupt and resume the process with the Resume option. The termination option allows you to safely terminate the process, while the termination option terminates the program by force.
If the system monitor is not installed on your system, install it as follows:
$ lets sudo apt install the gnome monitor system
To start the system monitor, click the super key and search using the search bar above. When the search result is displayed as follows, press the Enter key to open it.
The system monitoring window displays a list of processes that are running on your system. To end a process, right-click and select the End option. The selected process is interrupted immediately.
Destruction of the process via hotkeys in terminal
The Linux command line contains a number of useful keyboard shortcuts. The following names can be used to end the ongoing process.
Ctrl+C: It sends a SIGINT that completes the ongoing process.
Ctrl+Z: It sends the SIGSTP, which suspends the request and sends it in the background. However, this does not stop the process. You can use the command command to display the process in a pause. Use the fg command to highlight the process.
Ctrl+ : He sends SIGQUIT, which completes the process. It also creates a kernel dump file that can be used to debug the process.
Process destruction with xkillUtility
With Xkill you can end a running program with the mouse pointer. This is a GUI-based utility pre-installed on most systems. If it has not yet been installed, you can install it as follows
$ sudo apt installation xorg-xkill
To close a program, simply type it into the terminal’s command line:
When the above command is executed, the mouse pointer has the form of x. Now place the cursor on the program you want to close and click on it with the left mouse button.
Determination of the abbreviation Xkill
You can define an xkill shortcut that allows you to close the application immediately without having to open the terminal and execute the command.
To create a shortcut for xkill, open the Settings utility from the context menu on your desktop. Then open the Keyboard Labels tab and click on the + icon below.
Then, in the next dialog box, name a shortcut and type xkill in the Command field and click Set Shortcut.
Then define a custom shortcut of your choice and click the Add button.
If you want to exit an application now, simply press the shortcut keys and you can exit any open application on your system.
Murder procedure with murder orders
There are also command line methods used to destroy processes under Linux, including kill, pkill and killall.
To find out which processes are currently running on your system, you can use the command -A flagged ps:
It provides an overview of all processes in your system.
Killing
The Kill command can be used to destroy a process running under Linux. The assassination team will receive the PID of the trial to be killed.
To find the identification of the current process, you can use the ps -A command. You can also pass the ps output to the fingering command to find the identification of a specific process:
$ ps -A |grip
For example:
You can use Firefox to find the identification of the program’s startup process:
Once you have found the NID of a certain process, you can kill it as follows
The Kill command sends a SIGTERM signal to the specified PID, requesting completion of the process after the required cleaning action has been performed.
In some scenarios, the Kill command does not interrupt the process. If this is the case, you should choose kill -9 and then PID:
When option -9 is used with the Kill command, a SIGKILL signal is sent, requesting immediate shutdown without cleaning.
Murder
As with the kill command, pkill sends a SIGTERM signal to end the non-response process. But the advantage of pkill is that you don’t have to foresee the PID process to kill it. You can simply enter the correct keyword associated with the process.
For example, to exit a Firefox program, you can simply select
It terminates all processes whose names correspond to those mentioned above.
With pkill you also have the possibility to terminate a process that is being executed by a specific user:
$ pkill -u keyword>
Be careful when using this option, because if you do not specify it, all processes with the specified username will be aborted.
Killing
The Killall command is similar to the pkill command, except that it accepts the full name of the process as an argument instead of an associated keyword.
To use the killall to terminate all processes and their children with a specific name, use the following syntax:
For example:
That’s all there is! In this article you have discovered the different ways to destroy the process under Linux. Use these commands with caution, because destroying a process causes it to stop immediately and data to be lost. Even killing the wrong process can ultimately lead to the failure of the system.process linux,managing linux processes,ps in linux,ps and kill,kill all command,how to update vlc in linux