Categories: Ubuntu

Use of Top Command in Linux

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
Use of top command in linux 7
Sponsored

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.

Use of top command in linux 8

Show Path of Processes

Make sure press “c” after running top command and it will show the path of processes.

Use of top command in linux 9

Kill running process

After running Top command you can see all processes along with their process ID (PID)

Sponsored

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.

Use of top command in linux 10

Renice a Process

Renice is used to change a process priority.
By simply running a “top” command you can find your specific process ID.

Use of top command in linux 11

I will renice the priority of PID 22.
Use this command “renice -n -10 p22” to change the priority of the process. You can select your own PID.
You gonna see the Old priority and new one.

Use of top command in linux 12

That’s about it.

The post Use of Top Command in Linux appeared first on Osgrove.

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

2 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

3 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

3 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

4 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

4 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

5 days ago