I had this happen on Ubuntu more times than I’d like to admit: an app freezes, the window won’t close, and even clicking “Close” does absolutely nothing. On Windows, I’d smash Ctrl + Alt + Del and end the task—so I went looking for the Ubuntu version of that.
The good news: Ubuntu has a few easy ways to force close an app in Ubuntu. The fastest (when it works) is xkill. If you want something more “Task Manager-like”, System Monitor is perfect. And if you’re on a server or prefer the terminal, pkill / kill gets the job done every time.

Method 1 (fastest): Force close the frozen window using xkill
This is the closest thing to “click and kill” for a stuck GUI window.
- Press
Alt + F2(opens the Run dialog on many Ubuntu desktop setups). - Type
xkilland press Enter. - Your cursor turns into a cross / X.
- Click the frozen app window to force close it.
Cancel tip: If you change your mind, press Esc or right-click to cancel.
If xkill doesn’t work (Wayland note)
On some Ubuntu installs (especially Wayland sessions), xkill may not show the X cursor or it might only work for some apps (usually XWayland apps). If that happens, skip to System Monitor or use the terminal method below.
Method 2 (Task Manager style): Use System Monitor to end/kill the process
If you want the most familiar approach (Windows Task Manager style), this is it.
- Open System Monitor (search it from Activities / Applications menu).
- Go to the Processes tab.
- Find the app (or process) that’s stuck.
- Click End Process.
- If it still refuses to close, right-click it and choose Kill.
I like this method because it’s visual and safe—you can double-check you’re killing the right thing.
Method 3 (most reliable): Force close an app from the terminal
If the UI is lagging or you’re working over SSH, terminal commands are the quickest and most reliable way.
Option A: Kill by app name (pkill)
If you know the app/process name, pkill is easy:
pkill firefoxIf it won’t close, go stronger:
pkill -9 firefoxNote: -9 is the “hard stop” option. It ends the process immediately, so unsaved work is usually gone.
Option B: Find the PID and kill it
If you’re not sure what the exact process name is, find it first.
ps aux | grep firefoxOr use an interactive view:
topOnce you have the PID (example: 12345):
kill 12345If it still won’t die:
kill -9 12345Which method should you use?
- Quick GUI kill: use
xkill - Safer GUI method: System Monitor (End Process / Kill)
- Works everywhere: terminal
pkillorkill -9
Helpful links (internal + outbound)
- GNOME: Kill (close) a program immediately
- Ubuntu manpage: xkill
- How to change the welcome message on Ubuntu VPS
- Set automatic logout timeout in Ubuntu terminal
Final thoughts
Now when an app hangs on Ubuntu, I don’t waste time fighting the frozen window. I try xkill first, and if that’s not available (or I’m on a setup where it doesn’t behave properly), I jump straight to System Monitor or the terminal. Once you use these a few times, it feels just as quick as Task Manager on Windows.
