Skip to content

htop – interactive process viewer for system monitoring

The htop command is a system monitoring tool for Linux that provides an interactive and real-time view of the system processes. Here is a tutorial on how to use the htop command:

  1. Open a terminal window: To access the Linux command line, you can use the terminal application, which is usually found in the “Utilities” or “System Tools” section of the application menu.
  2. Install htop: If htop is not already installed on your system, you can install it using your system’s package manager. For example, on a Debian-based system, you can run the following command:
sudo apt-get install htop
  1. Run htop: To run htop, simply enter the following command in the terminal:
htop
  1. Understanding the htop interface: The htop interface displays a list of all running processes on the system, along with information such as the process ID (PID), user, CPU usage, memory usage, and status. You can navigate the list of processes using the up and down arrow keys, and you can sort the list by a specific column by clicking on the column header.
  2. Search for a process: To search for a specific process, you can use the / key to enter search mode, and then type the name of the process you want to search for. htop will highlight any matching processes in the list.
  3. Kill a process: To kill a process, you can select the process in the list and then press the F9 key. This will bring up a menu of options, including the option to kill the process.
  4. View process details: To view detailed information about a process, you can select the process in the list and then press the Enter key. This will open a new window with information such as the command line arguments, environment variables, and open files.
  5. Quit htop: To quit htop, press the q key.

These are the basics of using htop. htop provides many other features and options, such as the ability to filter the process list, configure the display, and manage process priority. To learn more about these features, you can consult the htop manual page by running the following command:

man htop