Is there a way to copy text in htop?

Normally in putty you can just select text to copy it, but I can't seem to select text with my mouse in htop.

Of course there's no right click menu to copy, ctrl+c doesn't work, and I didn't see any copy command in the help menu.

Is it possible to copy text in htop?


In my experience, holding Shift lets you select text in programs that have mouse support (of which htop is one, I assume).


One approach to copy long lines from htop is the following:

step 1. Change the font size of your terminal to something very small (say 6pt).

step 2. Run htop and maximize window

step 3. Run your processes, switch to htop window and carefully do Ctrl + Shift + A to select everything, then release A and hit C (without releasing Ctrl + Shift). It might take some time to be able to do it (some of the times you might kill htop accidentally).

step 4. Open gedit or another text editor and Ctrl + V if the editor is a GUI or hit Ctrl + Shift + V if the editor opened on the terminal (for example nano).