stop a frozen program
Find a program that stopped answering and end it: politely first, by force if it must.
danger Steps marked in red delete, overwrite or stop something. Read each one before you run it.
Steps
-
pgrep -l NAMEthe PIDs of the programs with that name
-
kill PIDask it to quit, so it can save and clean up
-
kill -9 PIDdanger force it to stop at once, if it did not quit
-
pkill NAMEdanger ask every program with that name to quit
-
xkillclick a window to close its program (X11 desktops)
Notes
- Put the program's name in place of NAME, and the number from pgrep in place of PID.
- A force-stopped program loses what it had not saved.
- If the whole desktop is frozen on Linux, Ctrl+Alt+F3 often opens a text console where you can log in and do the same.
- macOS: Option+Command+Esc, or the same commands.
Commands used
killpkillpgrepkillall
Each has a page in lore: lore kill opens it.
Related recipes
- find what killed a processA program vanished or says "Killed": usually the kernel ran out of memory and stopped it. Find out.
- keep a command running after logoutStart a long job so it survives closing the terminal or the ssh session, and come back to it.
- list and close tmux or screen sessionsSee the terminal sessions left running, join one, or end them.
- see a program's memory useHow much memory a program really uses, and which programs use the most.