How to make htop sort by PID

7,161

Solution 1

htop --sort-key PID

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

htop --sort-key help

shows a list of all the column keys.

Solution 2

Press F6 and select PID...

Share:
7,161

Related videos on Youtube

tony_sid
Author by

tony_sid

Born and raised in California. Computers are my main hobby.

Updated on September 18, 2022

Comments

  • tony_sid
    tony_sid over 1 year

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

  • tony_sid
    tony_sid about 13 years
    Is there another way without having to press F6?
  • HikeMike
    HikeMike about 13 years
    @OSX Press >.
  • tony_sid
    tony_sid about 13 years
    That causes the program to crash.
  • HikeMike
    HikeMike about 13 years
    @OSX It works on my machine and is documented in htop's man page. It would work if you didn't have another issue.
  • new123456
    new123456 about 13 years
    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).
  • tony_sid
    tony_sid about 13 years
    I'm using an external keyboard, and F6 is assigned to do something else. In order to use F6 as a function key, I have to press the Fn button, but that's not on the external keyboard.
  • HikeMike
    HikeMike about 13 years
    @OSXJedi As I wrote before, press > (greater than) instead.