Technical skill

Linux command: htop

Subject: .../LINUX

When a computer feels slow, a list of running programs can help show where to look. htop is a screen that refreshes while you watch. Each row usually represents a process, which is a running program, and columns show measurements such as CPU use, memory, owner, and state. The display gives samples of system activity; it can point to a busy program, but a high number alone does not explain why the computer is slow.

Start htop from a terminal. Use the arrow keys to move through the list, and press F1 or h for the help screen in versions that support those keys. The setup view lets you choose meters, columns, and display options. On a remote or minimal system, the terminal and installed ncurses support affect how the interface works.

To focus on one known process, use htop -p 1234, replacing 1234 with its current PID. Interactive search and filtering can narrow the display by command. In common configurations, P sorts by processor use and M by memory use; check the help screen if keys differ in the installed version.

A useful investigation compares several refreshes. Note which process rises during the slowdown, then inspect its command, parent, state, and application logs. If memory is high, identify the column first. Resident memory, virtual size, shared memory, and proportional measures describe different quantities. A row's memory figure is not necessarily the amount the system would recover if that process exited, and one process's value does not describe total system memory pressure.

The action menu can send signals or change scheduling priority. Those operations affect live programs. Confirm the selected row and the action before using them; sending a signal from htop has the same consequences as sending it from a shell.

htop samples operating-system counters at intervals. A brief spike can vanish by the next refresh, while a longer interval can hide short bursts. CPU percentages also depend on whether the display is normalized across cores. Compare repeated samples and use another tool for disk latency, network traffic, kernel pressure, or per-thread detail.

A missing command line or process can result from permissions, namespaces, or display settings. For thread-level activity, choose a thread view if available or use a dedicated command. Pair what the screen shows with the service's logs or application metrics before deciding that a process is the cause.

Interactive exercises

Materials

Skillsets
Skillset Linux administrator preview
image descriptionLinux administrator
by Infinite Education
3080 users
Skillset Devops preview
image descriptionDevops
by Ajay Kumar
2004 users
Skillset PostgreSQL DBA preview
image descriptionPostgreSQL DBA
by Artem Naumenko (fb)
1630 users
Skillset Skyeng Senior Backend Developer preview
image descriptionSkyeng Senior Backend Developer
by Artem Naumenko (slack2)
39 users
Skillset Linux for backend developer preview
image descriptionLinux for backend developer
by Artem Naumenko (fb)
16 users
Show more
Do you know that ...?
Any useful or interesting facts about the skill. Any peace of information would be useful