Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook Twitter Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home»Linux»How to Force Quit an App on Linux

How to Force Quit an App on Linux

Nishant AryalBy Nishant AryalAugust 30, 2022
How-to-force-Quit-an-app-on-Linux

Sometimes when the app is not responding, you cannot close it by clicking the normal close tabs. In such cases, you must force quit such applications. 

Moreover, Linux is one operating system platform that gives multiple options for you to terminate the applications and system processes. Linux users can use the terminal, system monitor, and even add custom keyboard shortcuts, which makes it very convenient to force quit unresponsive apps. 

In today’s article, we will go through different processes to force quit apps on Linux using different command lines and Graphical interface tools. 

How to Force Quit an App on Linux?

There are different CLI and GUI-based methods to force kill an app on Linux. The easiest method to force quit an app is from the System monitor utility and the Xkill command. There are other advanced tools as well that you can use for this purpose. We will discuss them in detail in this article. 

Force Quit an App on Linux With GUI

Some Linux distros like Ubuntu and Mint provide GUI applications to overview the system processes. These applications can be used to manage the system process and, additionally, to force quit the apps.  

Using System Monitor App

In some distros that use GNOME Desktop Environment, a system process monitoring app is provided called System Monitor App, which is similar to Windows’s Task Manager. Users can force quit an app using this application. 

Here is how to do it:

  1. Go to Applications.
     applications
  2. Search for System Monitor and open it.
    System monitor
  3. In the Processes window, search for the Application you want to kill and right-click it.
  4. Select Kill or press Ctrl + K to force quit the app.
    kill-app
Note: If the system monitor app is not installed in the system, enter this command in the terminal to install it.  sudo apt-get install gnome-system-monitor

Using Keyboard Shortcut

You can also set a certain keyboard shortcut to quit an app running in the system. There is a feature to add keyboard mapping to initiate this.  Here is how you do it.

  1. Navigate to settings.
  2. From the left panel of the settings, go to Keyboard.
  3. Click on View and Customize Shortcuts.
    view-and-customize-shortcut
  4. Select Custom Shortcuts.
    custom-shortcut
  5. Click on Add Shortcut.
    add-shortcut-on-linux
  6. In the Name field, assign it an appropriate name. And in the Command field, type xkill.
  7. Now, click on the Set shortcut and press the desired shortcut key for the xkill to activate.
     Custom Shortcut
  8. Finally, click on Add to save changes. This will set the desired shortcut key for the force quit. 
  9. Now, to force quit any app, press the Keyboard button you have assigned (For example, Shift + Ctrl + Esc). Your mouse cursor will then change into an X sign.
  10. Hover the mouse cursor over the app’s window and click on it to force quit the application.

Force quit an App on Linux With Commands

You can use multiple command lines in Linux to manage the system processes. Additionally, some commands such as xkill, killall, and htop make it very easy to terminate the process in a go. We will go through some of these CLI tools you can use in Linux to force quit an app.

Before using the commands for the force stop, it is necessary to know about the process id. Each running process on Linux has an id you can use while terminating it. In order to determine the process id, you can use the pidof command. Use the syntax with the following format, along with its use case and output as shown in the screenshot.
 pidof <Process Name>Pidof command

If you are unaware of the exact process name, use the ps command to determine it.
ps aux | grep -i <process name>ps command

Using Xkill

If you use the xkill feature, it will change the mouse cursor to X, which you can place over an application window and click on it to end its processes.  Earlier, we mentioned a process to map the keyboard to activate the xkill command. However, you can also use this command from the terminal. Follow these steps to use it.

  1. Press Ctrl + Alt + T to launch the terminal.
  2. Type xkill and hit enter. The mouse cursor will now change to X.Xkill command
  3. Take the cursor over any point of the application window you want to force quit and click on it. 
  4. Finally, the application process will stop in the system. 
Note: The xkill command is not installed by default on Linux and only works on Xorg sessions. You would have to install it using the package manager. Use this command to install it.  sudo apt-get install xorg-xkill

Using Kill command 

Kill command is a useful tool to terminate the system processes or applications running on Linux. The kill command uses the process id of the application and signals it to terminate the processes from the system.

Here is the syntax for the command, along with its use case in the screenshot. 
sudo kill -9 <process_id>Sudo kill -9

If you have multiple processes to close, you can enter their process id into the single kill command line to force stop them at once. Here is the syntax for it.
sudo kill -9 <processid1> <processid2>< processid3>Sudo kill -9 with multiple process id

Using Killall

If you know the application’s process name, you can directly use the killall command to terminate the application from the system. Use this syntax for it. 
killall <process name>Killall command

Using Htop 

htop is the command line that lets users monitor the terminal’s system processes and manage them. The latest alternative to the top command allows you to force quit the application and processes in the Linux OS quite efficiently. To use the htop command line, follow these steps;

  1. First of all, install the htop using the package manager if it isn’t already installed.
    sudo apt-get install htopsudo install apt htop
  1. Now, execute the command htop
  2. Select the process you want to stop the process.Htop command
  3. Then press F9. You will get options for sending the kill signals.
  4. Select SIGKILL and press enter. Signal kill in Linux
how-to
Nishant Aryal
  • LinkedIn

Nishant is an enthusiast who loves writing about technology. He also is heavily invested in keeping himself updated about the latest happenings in the tech world. At Tech News Today, he covers Operating Systems, how-to-topics, and Fixes.

Related Posts

how to change boot order on linux

How to Change Boot Order on Linux

December 16, 2022
make-command-not-found

How to Fix “Make: Command Not Found” Error

September 20, 2022
linux terminal for windows

How to Install Linux Terminal on Windows

September 19, 2022
best linux for virtualbox

8 Best Linux Distros to Try in VirtualBox

August 30, 2022
ifconfig command not found

How To Fix “ifconfig Command Not Found” Error?

December 18, 2022
format usb linux

How To Format USB In Linux (5 Easy Ways)

August 22, 2022
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
Memory-Compression

What is Memory Compression in Windows? Should You Enable or Disable It

March 1, 2023
dism-vs-sfc-vs-chdsk

DISM, SFC, CHKDSK: What’s the Difference

February 28, 2023
bios-settings-for-gaming

Best BIOS Settings for Gaming

February 16, 2023
You may also like
how-to-clean-hp-printer-rollers

How to Clean HP Printer Rollers

March 3, 2023
keyboard input lag

9 Ways to Fix Keyboard Input Lag

March 3, 2023
keyboard key is stuck

How to Fix a Stuck Key on a Keyboard

March 3, 2023
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

November 10, 2022
Facebook Twitter Pinterest
  • Home
  • About Us
  • Our Team
  • Editorial Guidelines
  • Privacy Policy
  • Affiliate Disclosure
© 2023 TechNewsToday, editor@technewstoday.com | Tech Central Pvt. Ltd.

Type above and press Enter to search. Press Esc to cancel.