How to Use top Command in Linux

Windows Articles

How to install KVM on Debian 10?

Hello friends, in this post I will show you how to install KVM on Debian 10. KVM stands for...

How to open Windows 10 Mobility Center

Hello! There are many types of users of Windows 10. As it depends on the type of hardware used. That is, the...

Ubuntu 20.04.1 available

Canonical, the company led by Mark Shuttleworth, releases Ubuntu 20.04.1. It has a new image, with updates and security patches for the...

How to install Linux Kernel 5.8 on Ubuntu 20.04?

Upgrading the Linux Kernel can be a beneficial task, but it is always optional. Recently we talked about the Linux Kernel 5.8...

How to activate XPS Viewer in Windows 10

Hey, what's up! When working with Windows 10 we probably use a lot of files. Indeed, these files have many extensions. For...
Muhammad Nabeel
Muhammad Nabeel
Network and System Administrator

top (table of process) command allows users to monitor processes, CPU information and memory utilization in Linux. It is pre-installed on all linux distributions. In this article we will learn that how to use top command.

Run top command and it will show the following

top

PID:    Shows each task unique process id.
PR:      Shows task priority
SHR:    Represents the amount of shared memory used by a task.
VIRT:   Total virtual memory.
USER:  User name or owner of task.
%CPU: Represents the CPU usage.
TIME+: CPU Time
SHR:    Display Shared Memory in kb used by a task.
NI:      Shows a Nice Value of task. A Negative nice value means higher priority, and positive Nice value means lower priority.
%MEM: Shows the Memory usage of task.

press “q” on your keyboard to quite from top.

Highlight Running Process in Top

When you execute top command press “z” key to highlight running processes.

Show Path of Processes

press “c” after running top command and it will show the path of processes as you can see in image below.

Kill running process

when you run top command you can see all processes along with their process id (PID)

If you want to kill a process,
simply run “top” command to find your specific process ID,
press “k” and then type your PID number
and press “enter” key to kill it.

Renice a Process

renice is used to change a process priority,

simply run “top” command to find your specific process ID, e.g I will renice the priority of PID 27
Press ‘r‘ option to change the priority of the process.
Now enter you process ID (Example is in image below)

Then you will see “Renice PID to value” enter new priority value,

That’s it.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install KVM on Debian 10?

Hello friends, in this post I will show you how to install KVM on Debian 10. KVM stands for...

How to open Windows 10 Mobility Center

Hello! There are many types of users of Windows 10. As it depends on the type of hardware used. That is, the...

Ubuntu 20.04.1 available

Canonical, the company led by Mark Shuttleworth, releases Ubuntu 20.04.1. It has a new image, with updates and security patches for the...

How to install Linux Kernel 5.8 on Ubuntu 20.04?

Upgrading the Linux Kernel can be a beneficial task, but it is always optional. Recently we talked about the Linux Kernel 5.8...

How to activate XPS Viewer in Windows 10

Hey, what's up! When working with Windows 10 we probably use a lot of files. Indeed, these files have many extensions. For...