It’s often annoying when a program stops working and you can’t even close it. Rebooting the system is not always the right way to go and we are looking for ways to get rid of unresponsive programs easily and quickly. In this article we will learn more about these ways, including the GUI and command line to terminate the unresponsive applications on a Debian system.
We ran the commands and procedures mentioned in this article on a Debian 10 system. Some of the methods described here were performed in the command line terminal application. To open the Terminal in Debian OS, go to the Activities tab in the top left corner of your desktop. Then enter the keyword Terminal in the search bar. When the search result appears, click the Terminal icon.
Method 1: using the X button for unresponsive UI-based applications
If any of your UI-based programs are taking too long to respond, try closing them by clicking the x button in the upper-right corner of the window. Sometimes when you try to close an unresponsive application this way, you are prompted to submit the error report. In some cases, you also have the option to wait or force the application to exit.
This method will most likely close the application.
Method 2: using system monitor, Debian Task Manager
Similar to the Windows Task Manager, Debian OS also includes the built-in System Monitor utility. This system monitoring utility enables you to terminate, terminate, stop, and resume the processes running on your system.
To start the Gnome system monitor via the user interface, press the super key on your keyboard and enter the keyword System monitor. Alternatively, you can search for System Monitor Utility in the list of applications.
The system monitor is started by default on the Processes tab. Here you can see all of the processes running on your system, including the unresponsive processes. To terminate an unresponsive program, right-click it, then select the Kill Opportunity.
You can also try the Stop or Exit option to safely close the applications.
Method 3: using the Xkill utility
There is another Linux utility called Xkill that you can use to kill unresponsive applications on your system. It is pre-installed in most Linux distributions including Debian.
To run this utility, just enter xkill in the terminal:display
After running the utility you will see that the mouse pointer has changed to an ‘x’ or a skull. To close an application, just place the mouse pointer on it and left click on it. It will terminate the unresponsive program within seconds.
Create a keyboard shortcut for Xkill
While Xkill is an effective utility for closing unresponsive programs, opening the terminal and running the command can seem a chore. There’s also a quickest way to do this with a keyboard shortcut. Just hit the keyboard shortcuts and exit any unresponsive program.
Here’s how you can do it:
1. Open the keyboard shortcut settings
Press the super key on your keyboard, then search for the Keyboard shortcuts using the search bar that appears.
When the Settings window opens you will find a number of shortcuts for various purposes.
2. Create a custom shortcut
Scroll down at the bottom of the screen and click the + button. To add the shortcut for the Xkill utility, click the + button.
If that Add a custom link Dialog appears, enter xkill in the two fields “Name” and “Command” as shown in the following screenshot.
When you’re done, click Define link Button that allows you to set a custom shortcut for your Xkill utility.
Press the key combination of your choice that is not already used on your system. Here I enter Ctrl + Alt + 6 as a custom shortcut for Xkill.
When you’re done, close the dialog box. After that, you can see your newly added shortcut in the list.
Now try to use the shortcut and you will be able to quickly exit the unresponsive applications.
Method 4: using the kill, pkill, and killall commands
There are also several other command line methods that you can use to terminate unresponsive applications on a system. These capabilities are useful for those who prefer the command line to the GUI.
To see the currently running processes on your system, run the top-level utility with the following command in the terminal:
The output shows all processes running on your system together with their process ID (PID).
To exit a program, enter kill followed by its process ID (PID):
$ kill PID
Pkill can also be used to kill a process with the process name like this:
$ pkill [Process-name]
If you have many instances of an application running and you want to end all of them, try the following command:
$ killall [Process-name]
In this article we learned how to terminate processes using the various command line and GUI methods. Hope it will be helpful when you need to quickly exit an unresponsive application that is hanging and unresponsive.