Sort By Memory In Top Command on Linux

Updated: Feb 4

Top is a very powerful command to periodically display a sorted list of system processes. The default sorting key is %CPU on Linux. Below we collect 3 ways to sort processes by memory.

3 Ways to Sort by Memory in Top Command

  1. press shift+m after running the top command

  2. sort mem usage per process in the interactive menu. More details below.

  3. run command top -o +%mem

Sort By memory Usage per-process in the interactive menu

  • press Shift+f to enter the interactive menu

  • press the up or down arrow until the %MEM choice is highlighted

  • press s to select %MEM choice

  • press enter to save your selection

  • press q to exit the interactive menu


Which Process Use the Highest CPU Memory On Linux


Join our mail group. Get a free Linux account on Cloud.

Never miss a post!

Want a free Linux account?  This account can be used to login to our cloud server and practice Linux commands.


✔ Linux Commands   ✔ Linux Skills    ✔ LinuxPerformance   ✔ Linux Interview

Some articles are from the public internet. If you find your article misused or undesired here and you don't want us to display it, please let us know and we'll remove it immediately.