Anchor htop to one specific process?

I have a long list of processes displayed in htop, but I am only interested in one of them. As old processes terminate and new processes are spawned, htop keeps updating the displayed list of processes, which means that the one process I am interested in keeps jumping up and down the list.

Is it possible to disable this behavior somehow?

That is, I would like to anchor the scroll to this particular process. How can I do this?


You can't anchor a given process line to the top but htop can follow a process if you press Shift+F. From the man page:

   F    "Follow" process: if the sort order causes the currently  selected
        process  to  move  in  the list, make the selection bar follow it.
        This is useful for monitoring a process: this way, you can keep  a
        process  always  visible  on  screen. When a movement key is used,
        "follow" loses effect.

Here I'm following my Firefox process:

enter image description here

Note that if you're only interested in one particular process, the -p <pid> will do what you want (12352 is the pid of Firefox on my system):

$ htop -p 12352

enter image description here


You can do a filter using F3 and type a part of the command into the input field for the filter. This will at least narrow down your list of processes to stop other unrelated commands from pushing those your interested in down or up the page.