6

Is there a way to have the list of processes in htop only display as the name of the command, rather than the full pathname w/ flags?

2

As an update, now apparently there is an option in Setup/DisplayItems Show Program Path that is checked by default. Just need to uncheck that so only the command name is shown.

| improve this answer | |
2

Apparently not. You can however go to Setup/DisplayItems to Highlight the basenames.

It doesn't only list the command like you want, but it atleast makes it a little more visible.

| improve this answer | |
  • Ah. The highlighting helps a lot. Thx. Seems sort of dumb to not provide an option for basename-only listings, though -- it's extremely noisy the way it is now. – Yewge Jan 20 '10 at 13:51
  • There's a PR in htop github that may help resolving this issue some day: github.com/hishamhm/htop/pull/184 – Greg Dubicki Aug 7 '15 at 9:59
2

To make htop display only nginx processes:

htop -p $(pgrep nginx | paste -s -d,)
| improve this answer | |
  • htop -p $(pgrep nginx | paste -s -d, ) the space before the last closed bracket is important else the command gives an error htop: option requires an argument -- 'p' in my case. Second, the mentioned error occurs, when no process of this name is running at all – Hartmut P. Feb 1 at 11:53

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.