How to Kill an Unresponsive Program in Ubuntu

When an application freezes on Windows, you press Ctrl+Alt+Delete to open the Task Manager. When a program freezes on macOS, you use Force Quit. But what do you do when a web browser or a video editor completely locks up on your Ubuntu desktop?

Linux gives you absolute control over every running process on your machine. If an application stops responding, you can force it to close in seconds. Here is how to kill an unresponsive program in Ubuntu using both graphical shortcuts and terminal commands.

Method 1: The “xkill” Command (The Fastest Way)

If you prefer using your mouse, Ubuntu has a brilliant built-in tool called xkill that turns your cursor into a literal weapon against frozen windows.

  1. Press Alt + F2 on your keyboard. This opens a small “Run a Command” dialogue box in the center of your screen.
  2. Type the word xkill and press Enter.
  3. Your mouse cursor will instantly turn into an “X” or a skull-and-crossbones (depending on your desktop theme).
  4. Move this new cursor over the frozen application window and click anywhere inside it.

The application will instantly vanish, forcefully terminated by the X-window server. Your cursor will then return to normal.

Method 2: Use the System Monitor (The Graphical Way)

If you prefer a Windows Task Manager-style interface where you can see exactly how much memory and CPU the frozen app is consuming, use the System Monitor.

  1. Press the Windows/Super key to open the application launcher.
  2. Type System Monitor and press Enter to open it.
  3. Click the Processes tab at the top.
  4. Scroll through the list (or click the column headers to sort by CPU usage) to find the frozen application.
  5. Right-click the application’s name and select Kill (do not choose “Stop,” as that only pauses the app).
  6. A warning box will appear asking you to confirm. Click Kill Process.

Method 3: The “killall” Command (The Terminal Way)

If the entire graphical interface is lagging because a background process is out of control, opening the System Monitor might take too long. The terminal is much faster.

  1. Press Ctrl + Alt + T to open your terminal.
  2. If you know the exact name of the program (for example, Firefox), you can kill every instance of it simultaneously with one command.
  3. Type: killall firefox
  4. Press Enter.

If you get an “Operation not permitted” error, it means the application was launched by the root administrator. You will need to type sudo killall firefox and provide your password to force it to close.

What if the Entire Ubuntu Screen is Frozen?

If you cannot move your mouse or open a terminal, the entire desktop environment has crashed. Do not hold down the power button just yet!

Press Ctrl + Alt + F3 on your keyboard. This will drop you out of the frozen graphical interface and into a pure text-based terminal (a TTY). Log in with your username and password, then type top to see a list of running processes. Find the “PID” (Process ID number) of the frozen app, press q to exit the list, and type kill -9 [PID NUMBER] to destroy the frozen app. Then press Ctrl + Alt + F2 to return to your normal graphical desktop.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.

Receive our best articles and tips delivered straight to your inbox.