The Linux top command, is the linux version of the windows task manager. By using this command we can see the different running processes and manage them.
we can kill processes, change their nice etc.
when we look at the top command we can see the uptime in the first line.
In the second line the number of tasks, how many running.
In the third line we can see the cpu information.
Some Keyboard shortcut:
- l (lower case) will toggle on/off the uptime output.
- m (lower case) toggle the memory display.
- t (lower case) toggle the cpu display.
- f (lower case) show the current display field with asterisk, the field name and a short field description. we can use the arrow keys to navigate and space key for turn off/on the fields.
- s (lower case) sort the processes according to the selected field.
- u (lower case) after that writing user name, and it will show processes belong to the specific user.
will run the top in a batch mode, mode that is more fit for running in a script.