How to use the htop command to monitor system processes in real time
The htop command in Linux is a command line utility that allows users to monitor important system processes in real time.
Benefits of htop command
You can track important system resources or processes in real time. The color used in the output makes it much easier to read than the monochrome output of the top command.
Advantages of htop command are:
- Support mouse operation
- Allows you to scroll both horizontally and vertically, to view all processes and to complete the command line
- Lets you end a process without knowing the PID
- Start faster than the top command
- The top command requires you to enter a PID or priority value to change the priority or extend a process, and the htop does not.

Use the htop command
This command is easily called from the Command Prompt:
# htop
The use of the command is divided into 3 parts.
- In the first section (upper left corner), we see the bars that show the processor usage, the memory in use, and the swap memory (virtual RAM) in use respectively.
- The second part (upper right corner) displays standard information, such as task summary, load average and uptime.
- The last section is at the bottom, where you will see 12 columns, including:
- PID - Process ID
- USER - The process owner's username (or user ID if the name cannot be specified)
- PRI - The kernel's internal priority for the process
- NI - Nice value of a process - from low priority, 19 to high priority, -20
- VIRT - The total capacity of the program in memory
- RES - Resident Set Size (memory that the process uses)
- SHR - The size of the process share page
- S - Process status ( S - sleep / inactive, R - running, D - disk sleep / Drive sleep state, Z - zombie, T - suspended)
- W - Paging (memory management mechanism that allows real address spaces to allocate for scattered, discontinuous processes)
- CPU% - Percentage of CPU processes currently in use
- MEM% - Percentage of process memory currently in use
- TIME + - Time (calculated according to the time the process has taken of system and user time)
- Command - The full path of the command
As with most Linux commands, there are also options.
# htop [-dChusv]
- –D - delay (shows the delay between updates, in 1/10 seconds).
- –C - no-color (monochrome mode)
- –H - help (display the help message and exit)
- –U - user = USERNAME (only shows the progress of a given user)
- –H - pid = PID (shows only the given PID)
- –S - sort-key COLUMN (Sort by this column)
- –V - version (output and exit version information)

You can also use interactive commands while the command is running to change the arrangement / appearance of the window, like:
- Arrow,
Page Up
,Page Down
,Home
,End
- Scroll the progress list - Space - tag or untag a process
U
- Untag all processess
- keep track of system callsF1
- HelpF2
- SettingF3
- SearchF4
- FilterF5
- Tree viewF6
- SortF7
- Increase the priority of the selected processF8
- Decreases the priority of the selected processF9
- Destroy the processF10
- Exit (Esc
also works)
You can also sort columns simply by using the mouse.
Both new and experienced Linux users should use the man command to see all the features that the command provides.
# man htop

This command is not only an invaluable utility for experienced Linux users' toolkit, but also useful for new Linux users, helping to better understand how Linux works and explore many interesting things. taste.
You should read it
- Instructions for using pstree command on Linux
- 11 uses of ps command in Linux
- The best applications to monitor system performance on Android
- Use the Top command to see the processes running in Linux
- How to fix the problem of too many background processes running on Windows PC
- How to monitor network connections in Linux with pktstat
- How to generate a system performance report in Windows 10
- How to run a program periodically using the Watch command on Linux
May be interested
- How to check whether a Linux PC is 64-bit or 32-bit by command linehow to check if your linux system is 32-bit or 64-bit? in this article, tipsmake.com will show you how to define it using the gui and the command line.
- How to use Guake Terminal in Linuxfor many years, the terminal in linux remained unchanged. after all, there may not be much to fix or improve in a command prompt window. but guake proved this thinking wrong.
- How to conduct IoT pentest with Kali Linuxkali linux can be used to perform many pentest tests on computers in combination with other related techniques. the following are the penetration testing platforms and methods for iot devices related to kali linux.
- How to detect and clean hard drive memory with QDirStat in Linuxqdirstat was developed from an old, tested kdirstat tool, with the purpose of presenting statistics on how computer memory is used in a human-friendly way.
- How to use the stat command on Linuxthe linux stat command shows you more details than the ls command. the following article will show you how to use the stat command in linux. like ls, the stat command has many options. this makes it a great candidate for the use of alias.
- Things to know when using Linux with Waylandthe aspects of the linux desktop are always changing, but some components have existed for decades. such as the x window system (more commonly known as x). a faster and more secure alternative is being created. the alternative is wayland.