stop a frozen program
Find a program that stopped answering and end it: politely first, by force if it must.
processes
danger Steps marked danger delete, overwrite or stop something. Read each one before you run it.
-
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)
- 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.
killpkillpgrepkillall
Each has a page in lore: lore kill opens it.
find what killed a process
A program vanished or says "Killed": usually the kernel ran out of memory and stopped it. Find out.
keep a command running after logout
Start a long job so it survives closing the terminal or the ssh session, and come back to it.
list and close tmux or screen sessions
See the terminal sessions left running, join one, or end them.
see a program's memory use
How much memory a program really uses, and which programs use the most.