Using Top Command - Task Manager for Ubuntu

View more categories:

1- Top Command

When you are familiar with Task Manager in the Windows OS, you will wonder if there is something similar to Task Manager in Ubuntu Server or not.
In Windows, Task Manager is  a utility program allowing you to know which application is running on the system and resources it uses
Ubuntu supplies you with a similar program, however its interface is very rudimentary. The application is called as "Top Command".
To run "Top Command", you run the top command:

Top Command:

Note: To exit "Top Command", press 'q'.

2- Show Helps

You need press 'h' to see Helps, and press "ESC" to return to the main screen.

3- Add/remove Fields

There are lots of Fields you can care for. By default, "Top Command" only displays some Fields. Press 'f' to add or remove Fields:
The Fields with (*) are the displayed fields, other ones don't display on "Top Command".
Use up or down arrow keys to move to the the desired Field.
  1. Press ENTER.
  2. Press Whitespace to select or deselect Field.
Press "ESC" to return to the main screen.

4- Change the order of the Fields

It will be more visible when you change the order of the Field on the screen of the "Top Command".
Press 'f' to see a list of Fields.
  1. Press the right arrow key to mark the Field that need to move.
  2. Press the up/ down arrow to move the Field marked above to another location.
  3. Press ENTER to complete it.
Press "ESC" to return to the main screen.

5- Sort on Field

Assume that you want to know which program is using the most memory, you need to sort it by %MEM (% Memory).
Press 'f' to see the list of Fields.
  1. Select the Field to sort.
  2. Press 's'.
  3. Press "ESC" to return to the main screen.

6- Sort by CPU

CPU is an important field, it tells you which Process enables computer to process the most at the moment. Press "Shift + P" to  sort by CPU.

7- Display Specific User Processes

Use the option '-u' allowing you to specify user and to view which process is executed by this user.

top -u user_name
For example, see the processes that are executed by user 'tran':

8- Highlight Running Processes

Press 'z',  the program "Top Command" will display processes running with the colors. This helps you to identify the running processes easily.

9- Shows Absolute Path of Processes

When the processes are running, if you want to see the absolute path of the files that execute those processes, you need to press 'c':

10- Kill a process

In Windows, you can finish a running task by using "End Task".
On Ubuntu, you can use "kill" to kill a process.
  1. Press 'k'.
  2. Enter PID (Process ID).
  3. Press ENTER.

View more categories: