How to deal with not responding programs

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
Kyowash

How to deal with not responding programs

Post by Kyowash »

Rarely a process/program will not respond and the only way to fix it is to terminate it.
First you must know the process PID, an unique number to identify processes. Run the following command to show all currently running processes to find out its PID:

Code: Select all

ps aux
The process' PID is the second column. Now imagine that Firefox stopped working and its PID is 1234. To kill it, run:

Code: Select all

kill 1234
This sends a TERM signal to the process which asks it to close. However, if it's really, really not responding and it doesn't close, you must force the process to terminate sending it a KILL signal, which can be done running the following command:

Code: Select all

kill -9 1234
There are more signals you can send to a process and their behavior is explained in the signal manual page.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to deal with not responding programs

Post by catweazel »

A simpler way is:

Code: Select all

pkill <name>
No esoteric numbers required.

For example, pkill firefox.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: How to deal with not responding programs

Post by phd21 »

Hi "Kyowash" and "Catweasel",

Thanks for posting this for those that do not already know this.

FYI-1: My KDE systems have always had a key combination to Kill an unresponsive applications, Ctrl+Alt+Esc. This changes the cursor to the Kill application cursor (Pirate cursor) and you just click on the Titlebar (anywhere in the application window really) of the application you want to stop. If I am not mistaken, all Linux Mint editions can assign a Key combination to do the same thing. Hit ESC to not kill anything...

FYI -2: There are other posts on this in this forum already.

[SOLVED] Close Unresponsive Programs
viewtopic.php?f=47&t=218738&hilit=pirat ... r&start=20

Force Quit Keyboard Shortcut (You can use pkill or xkill, etc...)
https://community.linuxmint.com/tutorial/view/30

FYI-3: If your system is locked up, hold down "Alt+PrintScreen" and type reisub and your system still will restart immediately. hold down "Alt+PrintScreen" and type reisud and your system still will shutdown immediately.

7 Different Ways To Kill Unresponsive Programs in Linux
http://www.makeuseof.com/tag/6-differen ... -in-linux/



Hope this helps ...
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to deal with not responding programs

Post by catweazel »

phd21 wrote:Hi "Kyowash" and "Catweasel",

Thanks for posting this for those that do not already know this.

FYI-1: My KDE systems have always had a key combination to Kill an unresponsive applications, Ctrl+Alt+Esc.
Try that and accidentally click the desktop instead of an application :mrgreen:
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Faust

Re: How to deal with not responding programs

Post by Faust »

I've always liked the xkill command .... heck , I even like the name of it !

Line up the culprit in the cross-hairs and pull the trigger !

( Actually , it's just point and click , but that doesn't sound nearly so exciting , does it :D )
aes2011
Level 4
Level 4
Posts: 498
Joined: Wed Jul 06, 2011 10:39 pm

Re: How to deal with not responding programs

Post by aes2011 »

Faust wrote:I've always liked the xkill command .... heck , I even like the name of it !

Line up the culprit in the cross-hairs and pull the trigger !

( Actually , it's just point and click , but that doesn't sound nearly so exciting , does it :D )
I like xkill as well and assigned Super+Delete as a keyboard shortcut to bring up the skull and crossbones :)
Kyowash

Re: How to deal with not responding programs

Post by Kyowash »

I decided to explain how to do it via CLI just in case the desktop environment froze, so you can go to the virtual console with Ctrl + Alt + F1. Of course, there are also multiple ways to do it from the GUI. Anyway, I must say some of them were unknown to me, glad to see people providing simpler ways.
Post Reply

Return to “Tutorials”