How to collapse all trees in htop?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Fantascape Looping
--
Chapters
00:00 How To Collapse All Trees In Htop?
00:16 Accepted Answer Score 7
01:29 Answer 2 Score 6
01:41 Answer 3 Score 6
01:48 Answer 4 Score 2
02:09 Thank you
--
Full question
https://superuser.com/questions/855016/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #unix #htop
#avk47
ACCEPTED ANSWER
Score 7
Possible as of 3.1.0 (not yet in all distributions)
As of htop --version
3.1.0, you can in fact toggle-collapse all branches of the tree view (F5) using hotkey * (asterisk). The release happened only on 2021-09-21, so most 2022 linux distributions (except those with rolling releases) are about to receive the updated version with their next release.
For example, the Ubuntu package overview for htop
shows that
- ❌ Ubuntu 21.10 (impish) and 22.04 LTS (jammy) both stick to version 3.0.5 and only
- ✅ Ubuntu 22.10 (kinetic) ships with 3.2.1.
And just for completeness sake:
- Collapsing and expanding invidivual tree nodes was/remains possible using - and +
- To review all key bindings in your version of htop, simply enter the help screen (? or h or F1)
ANSWER 2
Score 6
AFAIK "t" is the hotkey for expansion and collapsing tree view in htop.
ANSWER 3
Score 6
You can use the *
key
This was implemented in version 3.0.5 (2021-01-12)
ANSWER 4
Score 2
It is still not implented. Moreover, F5/F6 were "killed".
Besides, +/- do not work from keypad. As a result, the whole idea of tree-view became useless (as for me it is the only possible way to represent a lot of processes)