Beruflich Dokumente
Kultur Dokumente
Linux soware is typically robust enough to work without causing any problems,
but from time to time, even the best apps might hang. Rather than wait for them
to crash, you can kill these unresponsive programs. In fact, there are so many ways
to kill them that you might find youre spoiled for choice!
If youre experiencing problems with an application in Linux, here are seven ways
to kill unresponsive soware.
If all goes to plan, some distros will prompt you to send an error report.
Either way, the application should have stopped running. But what if it hasnt?
2. System Monitor
The next option is to open your Linux operating systems System Monitor utility,
much like the Windows Task Manager. This is typically found in the System Tools
menu, and once launched will display a list of running processes under the
Processes tab.
Stop Process this pauses the process, letting you continue it later. It wont
work in most cases.
End Process the correct way to close a process, this will safely terminate
the application, cleaning temporary files on the way.
Kill Process this is the extreme option, and should only be used if End
Process fails.
Its best to use these in order. However, if the application is one that hangs
regularly, you might prefer to jump to the command that you know works.
xkill
Your mouse pointer will then display a cross (or a skull), and all you need to do is
le-click on the oending application.
If its not possible to close your unresponsive app with any of these desktop-
focused methods, the solution might be the command line
Several command line options are available to help you to close your app. Better
still, these can be used either on your computer or by connecting over SSH from
another device.
The kill command can be used here, but first requires a process ID. You can find
this by running a command interrogating the application for its process ID:
The result will display the process ID. This can then be used as follows:
Alternatively, you can use the pgrep command to find the process ID:
As with the kill command, this should close the process within around 5 seconds.
Fortunately, it isnt as devastating as it might be. The killall command will end all
instances of a particular program. So, rather than killing one Firefox window, the
following command will end them all:
killall firefox
All you need is the process name and the killall command (possibly with sudo if
demanded by your setup).
Naturally, you should only use this command when needed. Its unsuitable for
most unresponsive program situations.
Next time you need to close an app, just use the keyboard shortcut. The mouse
pointer will become an X, and you can click anywhere on the app you want to
close.
So, the next time a Linux application or utility hangs and becomes unresponsive,
all you need to do is apply one of these solutions:
Its surprising that there are so many ways to kill unresponsive Linux apps
but whats your favorite? Share it with us in the comments box.
Christian
Cawley
905 articles