What Does the O Shortcut Do in htop?

The htop command-line utility is a powerful, interactive process viewer for Linux that allows users to monitor system resources and manage running processes in real time. Among its many keyboard shortcuts, the O (uppercase) or o (lowercase) key plays a critical role in organizing this data by opening the Sort By menu. This article explains how to use this shortcut to reorder your process list, compares it to other navigation keys, and highlights how it improves system troubleshooting.

Managing Process Sorting with the O Key

When you are monitoring a system, the default process list can be overwhelming. Pressing o or F6 brings up a sidebar menu on the left side of the screen displaying all available criteria for sorting your processes.

Using this menu, you can quickly sort your running applications by:

To use it, simply press o, use the up and down arrow keys to select your preferred sorting metric, and press Enter to apply the change.

The Difference Between Lowercase ‘o’ and Uppercase ‘O’

While both keys are related to sorting, they serve slightly different functions depending on the version of htop you are running:

Why This Shortcut is Essential for Sysadmins

Using the o shortcut significantly speeds up troubleshooting. Instead of manually searching through hundreds of rows of data, a quick tap of the o key allows an administrator to instantly isolate the exact process responsible for a system slowdown or a memory spike, making it one of the most vital navigation tools in the htop environment.