0

By default, htop shows many more processes than other tools (top, ps). The solution is to press H, as mentionned in Why are there many processes listed under the same title in htop?, to get the "usual" shorter process list.

With which command-line argument should we run htop, to have this behaviour?

7
  • 2
    In Debian htop saves its config in ~/.config/htop/htoprc and the state of H is there as hide_userland_threads=1 or hide_userland_threads=0. No matter what htop shows "by default", it's enough to configure it once and the setting will be saved. Doesn't your htop save the setting? Commented Sep 6, 2024 at 9:00
  • @KamilMaciorowski it does, but each time I deploy a new VM, I don't want to reconfigure this, I would prefer to copy/paste a command-line command. Commented Sep 6, 2024 at 9:22
  • 1
    @Basj I have a base copy of my .toprc that I copy around for the same reason. Once you have enough such utilities and custom configurations, it makes more sense to copy the config files around instead of random command-line arguments Commented Sep 6, 2024 at 9:29
  • @muru is there an encoding problem in this file? Here is how it looks on Github: i.sstatic.net/AR95Ze8J.png Commented Sep 6, 2024 at 13:26
  • It's a binary file, top doesn't save it's configuration as text. GitHub is vainly trying to interpret it as text. Commented Sep 6, 2024 at 13:33

1 Answer 1

1

There is no command-line option in htop to do this, not even an undocumented option.

As noted by Kamil Maciorowski, if you start htop once, toggle the display of threads (H), and exit, the setting is stored in htop’s configuration file and subsequent htop invocations will use the same setting. The configuration file is $XDG_CONFIG_HOME/htop/htoprc (~/.config/htop/htoprc); writing hide_userland_threads=0 there before the first execution of htop will achieve the desired effect.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.