How to sort processes by memory usage?

QuestionsQuestions8 SkillsProDec, 21 2025
0138

To sort processes by memory usage while the top command is running, you can use a simple keyboard shortcut:

Press M (Uppercase 'M').

Once you press it, the table will immediately reorder itself based on the %MEM column, putting the applications consuming the most RAM at the top.

Quick Summary of Sorting Keys:

  • M: Sort by Memory usage.
  • P: Sort by CPU usage (returns to default).
  • T: Sort by Running Time.
  • N: Sort by Process ID (PID).

Try it now:

  1. Run top in your terminal.
  2. Press Shift + m (to send an uppercase M).
  3. Notice how the process list changes!
  4. Press q when you want to exit.

Does that help you find what's using up your memory?

0 Comments

no data
Be the first to share your comment!