We all know about top, its a real-time, dynamic process/task viewer. It is one of the most commonly used command by Linux admins. The real power of this command is that all the information displayed is configurable.

Let’s start understanding top command using different options and examples….

Start Using Options

1. When we run top command without any option, it displays unfiltered system information and different processes/tasks. Type ‘q’ inside ‘Column Header’ to come out of the viewer.

# top

Summary area description: –

2. After running top without any option, press ‘l’ to toggle (hide/unhide) the ‘Uptime’/’Load Average’ line.



3. After running top without any option, press ‘t’ to toggle (hide/unhide) ‘Task’/’CPU States’ line.



4. After running top without any option, press ‘m’ to toggle (hide/unhide) ‘Memory’/’Swap Usage’ line.



5. After running top without any option, press ‘1’ to toggle (hide/unhide) ‘Single’/’Separate’ CPU states line.



6. After running top, press ‘h’ for different interactive commands.

7. After running top, press ‘Z’ to change color mappings.

Try to use different combinations as ‘T1S5M6H3’ and press ‘enter’. your new color mappings are ready for viewing.

8. After running top command, press ‘B’ to enable/disable bold effect.

After Pressing ‘B’

9. After running top command, press ‘f’ to hide/unhide fields.

Press ‘aehioqtwknmx’. Now the field string ‘AEHIOQTWKNMbcdfgjplrsuvyzX’ changed to ‘aehioqtwknmbcdfgjplrsuvyzx’.

And, now press enter. As you see, now no tasks are present with in ‘Task Area’ as all the letters within a field string ‘aehioqtwknmbcdfgjplrsuvyzx’ are in lower case.

Press ‘ aehioqtwknmx’ again, your columns will reappear.

10. After running top command, press ‘o’ to change the order of the fields.

Press any field letter in lower case. you will find that the corresponding field letter move towards right.For example, press ‘a’ 4 times.

And, now press enter. As you see, now ‘PID’ column shifts to 5th column.

Press any field letter in upper case. you will find that the corresponding field letter move towards left.For example, press ‘A’ 4 times and press enter. your ‘PID’ column comes back to its default position (1st column).

11. After running top command, press ‘F’ to sort tasks list.

press ‘a’, now ‘A’ becomes new sort field and ‘PID’ is the new sort column.

Press enter, as you see task column is sorted as per ‘PID’.