47

I use htop in a terminal but I can't close it with F10. F10 seems to just open a program's File dialog. Is there a way to disable it so I can close htop normally?

Pithikos
  • 1,493

5 Answers5

50

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

Volker Siegel
  • 13,295
A.B.
  • 92,125
40

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

Maythux
  • 87,123
22

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

karel
  • 122,292
  • 133
  • 301
  • 332
elmicha
  • 9,960
2

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.

mckenzm
  • 383
1

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.

Liam
  • 131