I would like to be able to collapse all the trees in the default view of htop. Is there a way to achieve that at once, instead of selecting every tree and hitting F6?


As per this github issue it is not implemented but marked as wishlist.

| improve this answer | |

AFAIK "t" is the hotkey for expansion and collapsing tree view in htop.

| improve this answer | |
  • Worked for me. Dunno why it got a downvote :/ ? – The Unfun Cat May 1 '18 at 16:51
  • 3
    For me it switches between tree and list so it doesn't really collapse. – Henrik Sommerland Jun 1 '18 at 12:39
  • But that is callapsing Would you rather kill a process (tree)? – x3l51 Aug 2 '18 at 7:49
  • 2
    toggle between tree/list isn't what's being asked for here. – Bruce Edge Aug 3 '19 at 22:59
  • t is a switch to disable/enable tree view, not to collapse tree – QkiZ Apr 20 at 9:15

i don't know about any option to expand/collapse individual branches in htops tree view (or any other ncurse based software*) i would suggest to dont presume things of text based applications from things you have learned from graphical ones.**

You can (only) enable/disable tree based view using the function key nr. 5

greetings treaki

*:ive got somehow used to the different designe pattern in text based (dos era and ncurse or similar based unics ones) and graphical applications. This collapse tree thing was, in my eyes, a thing invented in windows...

**: i would sugesst anyone who want to get used to unix systems disable there gui for at least a week and learn things again from the button up...

| improve this answer | |
  • 4
    I is a pronoun and capitalised – random Dec 20 '14 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.