stop a frozen program

Find a program that stopped answering and end it: politely first, by force if it must.

  • processes

danger Steps marked in red delete, overwrite or stop something. Read each one before you run it.

Steps

  1. pgrep -l NAME

    the PIDs of the programs with that name

  2. kill PID

    ask it to quit, so it can save and clean up

  3. kill -9 PID

    danger force it to stop at once, if it did not quit

  4. pkill NAME

    danger ask every program with that name to quit

  5. xkill

    click 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

  • kill
  • pkill
  • pgrep
  • killall

Each has a page in lore: lore kill opens it.