54

How can I display only the processes of a specified user in htop?

Applying a filter (F4) doesn't seem to work, because it doesn't seem to apply the filter on the USER column.

a06e
  • 12,613
  • 25
  • 66
  • 102
  • F6 and you can sort by USER instead. Just use the arrow keys to select "USER" and then press Enter. It's not the same but at least it's alphabetical so each USER is isolated and easily distinguishable. – mchid Oct 21 '14 at 18:58

2 Answers2

63

From man htop:

   -u --user=USERNAME
          Show only the processes of a given user

So, if you run htop -u colord, you'll only see processes by the user colord.

Alaa Ali
  • 31,075
  • 11
  • 94
  • 105
  • 1
    Thanks for the answer, that'll do nicely for my situation too. I would love a way to switch on the fly though, rather than having to go out and back in, so if anyone knows of a way I'm all ears! – spookypeanut Sep 17 '15 at 08:46
  • 3
    @spookypeanut See [Domi's answer](http://askubuntu.com/a/728642/234374). – a06e Feb 02 '16 at 08:32
57

Another possibility is to press the 'u' key in htop. A selector that allows you to filter the process list by users will be displayed.

Domi
  • 571
  • 4
  • 2