12

How can you make htop sort the list of processes by PID?

2 Answers 2

16
htop --sort-key PID

appears to work. Found it via htop --help.

htop --sort-key help

shows a list of all the column keys.

0
13

Press F6 and select PID...

7
  • 2
    Is there another way without having to press F6?
    – tony_sid
    Apr 27, 2011 at 5:37
  • 11
    @OSX Press >.
    – Daniel Beck
    Apr 27, 2011 at 5:39
  • That causes the program to crash.
    – tony_sid
    Apr 27, 2011 at 5:47
  • 1
    @OSX It works on my machine and is documented in htop's man page. It would work if you didn't have another issue.
    – Daniel Beck
    Apr 27, 2011 at 5:48
  • I'm going to upvote you only because I think the OP is a little stingy here - there's nothing wrong with F6, and almost keyboard where it doesn't exist (with few exceptions).
    – new123456
    Apr 27, 2011 at 22:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .