Killing a runaway program

From MEPIS Documentation Wiki

Jump to: navigation, search

In GUI:

It depends on your keyboard scheme, but by default:

  • Ctrl-Esc brings up the task manager where you can select and kill processes.
  • Ctrl-Alt-Esc (or type "xkill" in "Run command"). This turns the cursor into a white "X" (hit Esc to cancel) and then you can just click on the program window to terminate it. If you prefer you can make a shortcut on desktop that runs "xkill", see Creating a link on the desktop.
  • Alt-PrintScreen(SysReq)-K kills the whole GUI session. This is quite radical but still much better than using the reset or power buttons.
  • If all else fails, hold down Alt-PrintScreen(SysReq) while pressing R E I S U B in turn, slowly (say, 1 second pause between). The U unmounts all drives, and B reboots. The others tidy up current O/S tasks. Still a bit kinder than power off or reset.

In terminal:

  • Ctrl-C will stop a program started by the user in a terminal.
  • killall programname (where programname can be autocompleted by typing first couple of letters and then hitting TAB key).
  • killall -9 programname (if the previous command fails).
  • kill PID (see PID for how to get this number).
  • kill -9 PID (if the previous command fails).
  • pkill name will stop all programs that match "name", it behaves similarly to grep command.
  • another useful way:

1. run top
2. press "k" and type the PID# of the process you want to terminate
3. press Enter to terminate the process
OR
4. type "9" and Enter to terminate the process with signal 9
Signal 15 is the default signal, and signal 9 should be used if signal 15 does not succeed to kill the process.

Links

Personal tools
In other languages