How to kill unresponsive programs in Linux

Although Linux software often causes fewer problems when operating, there are times when the best application also crashes. Instead of waiting for them to respond, you can exit these programs. This article will show you some ways to "kill" unresponsive programs in Linux.

How to close unresponsive programs in Linux

  1. 1. Close the unresponsive program by clicking the X button
  2. 2. Use System Monitor to close the Linux process
  3. 3. Exit Linux processes with xkill
  4. 4. Use the kill command
  5. 5. Use pgrep and pkill commands
  6. 6. Close all instances of an unresponsive program with killall
  7. 7. Create a shortcut to close the unresponsive program

1. Close the unresponsive program by clicking the X button

The buttons on the unresponsive application are usually gray or the options are not available. You can't even move the application window around the screen.

How to kill unresponsive programs in Linux Picture 1

So what's the solution? Click on the X button in the top corner (left or right depending on the Linux operating system you are using). This will bring up a dialog box, asking you to Wait or Force Quit to end the program. Some distributions require you to submit an error report.

2. Use System Monitor to close the Linux process

How to kill unresponsive programs in Linux Picture 2

The next option is to use the System Monitor utility of the Linux operating system. You can find this tool in the System Tools menu and display a list of running processes in the Processes tab.

To close unresponsive applications, select it and right-click. You will have three options:

  1. Stop Process : Pause the process so you can continue it later. However, this option does not always work well.
  2. End Process : This is the correct way to close a process. This option will turn off the application safely, erasing temporary files.
  3. Kill Process : This option is not recommended, only when the End Process option is unavailable.

3. Exit Linux processes with xkill

Another option you can use to close unresponsive programs is xkill. This is a built-in Ubuntu tool used to force closed unresponsive programs. If you don't use Ubuntu, you can install it via Terminal.

Xkill can close any computer process. To install xkill, use the following command:

 sudo apt install xorg-xkill 

Then run xkill with the command:

 xkill 

Your cursor will display an X, left-click the unresponsive application to close it.

4. Use the kill command

If the above measures cannot close your unresponsive application, press C trl + Alt + T to open Terminal.

There are several command line options that can help you close these applications. You can use them on your computer or connect via SSH from another device.

To close unresponsive programs, we will use the kill command, but a process ID is required. You can find this ID by running the following command:

 ps aux | grep [process name] 

Replace process name with the process name you want to close. After having a process ID, use the following command:

 kill [process ID] 

Replace process ID with the ID you just found in the above command.

Note: You may need to use the command with sudo.

How to kill unresponsive programs in Linux Picture 3

5. Use pgrep and pkill commands

If no process ID is found, you often switch to using the pkill command. This command does not require an ID, only the process name.

 pkill [process name] 

Alternatively, you can use the pgrep command to find the process ID:

 pgrep [process name] 

And then use pkill with the ID found in the above command.

 pkill [process ID] 

How to kill unresponsive programs in Linux Picture 4

As with the kill command, this operation will close the process within about 5 seconds.

6. Close all instances of an unresponsive program with killall

If kill and pkill cannot close your unresponsive application, it's time to use killall .

The killall command will close all instances of a specific program. For example, instead of just closing a Firefox window, it will close all windows of this program.

 killall firefox 

This method is very simple, you only need the process name and the killall command (can be used with sudo if necessary).

 killall [process name] 

However, you should only use this command when necessary because it is not suitable for most unresponsive situations.

7. Create a shortcut to close the unresponsive program

Want to save time closing unresponsive software? The best option is to create a shortcut to immediately close an application. However this option requires xkill use.

In Ubuntu, open Settings> Keyboard and click on Shortcuts , select Custom Shortcuts , then click + to create a new shortcut. Enter xkill for both Name and Command sections, then click Apply . You will see a list of shortcuts, select shortcuts and then press the key combination required to use when closing the unresponsive program.

How to kill unresponsive programs in Linux Picture 5

The next time a program is not responding, simply press the shortcut created above. The mouse pointer will turn into an X and you can click anywhere on the application to close it.

Frequently unresponsive applications cause problems? You should perform an upgrade of your computer's RAM.

If none of these solutions work and programs on Linux are often unresponsive, consider switching to a lightweight Linux operating system.

I wish you all success!

4.4 ★ | 11 Vote

May be interested

  • What is Unix / Linux?What is Unix / Linux?
    unix operating system is a collection of programs that act as a link between a computer and a user.
  • How to Run Linux GUI Applications with WSL2 on WindowsHow to Run Linux GUI Applications with WSL2 on Windows
    windows 11 has a lot of new features, but one particularly welcome feature is the windows subsystem for linux or wsl. wsl users can now run graphical linux applications as well as standard command line programs.
  • How to run Windows applications on Linux with WineHow to run Windows applications on Linux with Wine
    there are a number of applications from windows that are needed but there are no alternatives on linux. fortunately, there is a software project that allows you to run windows applications on linux. this software is called wine. it creates a compatibility layer for windows programs to interact with the linux operating system.
  • How to fix the unresponsive fingerprint sensor on the phoneHow to fix the unresponsive fingerprint sensor on the phone
    the unresponsive fingerprint sensor on the phone makes users feel uncomfortable when using the password input method to open the lock screen. so what if your phone also has this error?
  • How to Fix Slow and Unresponsive Windows 10How to Fix Slow and Unresponsive Windows 10
    are you experiencing a situation where windows 10 becomes jerky or unresponsive on your computer? there are many ways to fix when the computer is running slow or jerky. tipsmake today will guide you how to deal with when windows 10 is slow and unresponsive.
  • How to Uninstall Programs in Linux MintHow to Uninstall Programs in Linux Mint
    the linux mint operating system offers thousands of different programs and applications. but what happens when you want to uninstall one? here's how to do it! click menu. go to the applications you want to remove. right click on the...
  • Binary and Source Package: Which should be used?Binary and Source Package: Which should be used?
    what are the binary package and the source package? why should you use these two packages to install programs on linux?
  • How to Install and Use Homebrew on LinuxHow to Install and Use Homebrew on Linux
    although different linux distributions come with their own package managers, you will need homebrew on your system if you want to install programs that are not available in the default linux distro repositories.
  • How to install Windows Game on Linux with WinepakHow to install Windows Game on Linux with Winepak
    flatpak is a favorite choice of third-party vendors and proprietary software developers because it allows them to package linux programs once and distribute them on all linux versions.
  • How is Arch Linux different from other Linux versions?How is Arch Linux different from other Linux versions?
    arch linux is arguably the most misunderstood linux distribution. many people find arch difficult to install and maintain.