How to Install htop on Debian Linux?
The htop utility is an interactive, real-time process
viewer and system monitor that improves upon the classic
top command by offering a color-coded, user-friendly
interface. Managing processes with htop allows system
administrators and users to easily monitor CPU, memory, and swap usage,
as well as kill or reprioritize tasks directly from the terminal. This
guide provides a straightforward walkthrough for updating your package
repository, installing htop using the Advanced Package Tool
(APT), and launching the application on Debian-based Linux
distributions.
Step 1: Update Your Package Repository
Before installing any new software, it is best practice to refresh
your system’s local package index. This ensures that you fetch the
latest available version of htop from the Debian
repositories and avoids potential dependency conflicts.
Open your terminal and execute the following command:
sudo apt updateYou will be prompted to enter your password to grant administrative (superuser) privileges.
Step 2: Install htop via APT
Once the package lists are updated, you can proceed to install
htop. Debian includes htop in its default
repositories, making the installation seamless.
Run the following installation command:
sudo apt install htop -yThe -y flag automatically answers “yes” to the
confirmation prompt, allowing the installation to complete without
further manual intervention.
Step 3: Launch and Verify htop
After the installation process finishes, you can immediately verify
that htop was installed correctly by launching it.
Type the following command into your terminal:
htopThe standard command-line interface will transition into the
interactive htop dashboard, displaying live graphs of your
system’s hardware resource utilization and a comprehensive list of
active processes. To exit the htop interface and return to
your standard terminal prompt, simply press F10 or
Q.