A2oz

How Do You Sort by Memory Usage in Linux Top?

Published in Linux Command Line 1 min read

You can sort the processes displayed in the top command by memory usage using the following steps:

  1. Open the top command: Run top in your terminal.
  2. Press Shift + M: This will sort the processes by their memory usage.
  3. Toggle sorting order: To sort by memory usage in descending order (highest memory usage first), press Shift + M again.

This will allow you to quickly identify processes consuming the most memory on your system.

Related Articles