The Wayback Machine - https://web.archive.org/web/20240118180632/https://www.geeksforgeeks.org/how-to-install-and-use-htop-on-linux/
Open In App
Related Articles

How to Install and Use Htop on Linux?

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

For Linux systems, Htop is an interactive system control, process viewer, and process manager. It was created as a replacement for the Linux program top, and it has a lot of the same features as the top, but with a lot more flexibility in terms of how system processes can be interpreted. Unlike top, htop displays the entire list of running processes rather than just the most resource-intensive ones. Htop can view processes as a tree and provides resource-usage statistics using color.

Installation:

First, update your system sources:

$ sudo apt install htop
How to Install and Use Htop on Linux

Updating system source

Now, install htop using the below command:

$ sudo apt-get install -y htop
How to Install and Use Htop on Linux

Installing htop

Compiling from source

We’ll need ncurses, as well as development tools/build necessary, to compile htop from the source. The steps for downloading htop from the source are as follows.

Install development tools using the below command:

$ sudo apt-get install build-essential
How to Install and Use Htop on Linux

Installing development tools

Installing ncurses:

$ sudo apt-get install libncurses5-dev libncursesw5-dev
How to Install and Use Htop on Linux

Installing ncurses

Now download htop from the source using wget:

$ wget http://hisham.hm/htop/releases/2.2.0/htop-2.2.0.tar.gz
How to Install and Use Htop on Linux

Downloading htop

Extract tar:

$ tar xvfvz htop-2.2.0.tar.gz
How to Install and Use Htop on Linux

Extract tar

Change directory to htop:

$ cd htop-2.2.0/

Change directory to htop

Now run the configure:

$ ./configure
How to Install and Use Htop on Linux

Running the configure file

Now make a script:

$ make
How to Install and Use Htop on Linux

Making script

Now we can install htop:

$ make install

Installing htop

Now you can open htop by simply typing:

$ htop
How to Install and Use Htop on Linux

htop

Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 09 Apr, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials