How to kill htop if I can't use F10?

Solution 1:

TL;DR The standard way to quit htop is F10 or q.


Therefore if you can't use F10, use q (lowercase).

enter image description here

Solution 2:

You always can have the interupt signal keys Ctrl+c.

Basically Ctrl+c sends the SIGINT (interrupt) signal, ; by default, this causes the process to terminate.

Just like top, htop can be quit by pressing Q.

SIGINT

The SIGINT signal is sent to a process by its controlling terminal when a user wishes to interrupt the process. This is typically initiated by pressing Control-C, but on some systems, the "delete" character or "break" key can be used

Solution 3:

If you are using gnome-terminal, yes, you can disable that the F10 key opens the menu:

Open gnome-terminal's menu with F10 or with the mouse and go to Preferences. In the General section and disable the Enable the menu accelerator key (F10 by default) option.

enter image description here

Solution 4:

All sorts of other options apart from q.

  • Open another terminal and kill it from there.
  • Kill it from the System Monitor task list.
  • Close the terminal window.

These assume a desktop environment.

Also for servers...

  • Ctrl-Alt-F1 (or F6/F7) and log in again to kill.
  • Connect again (Telnet/SSH) and kill.

And finally - it is open source, patch it.

Solution 5:

If you're interested in making F10 (and other shortucts) available in general to terminal applications and you're using XFCE terminal, go to Edit -> Preferences -> Advanced -> Shortcuts and check the appropriate boxes to disable the keys. I have them all checked so that Emacs (m-f) and htop (F10) will work.