{"id":2976,"date":"2020-03-02T15:10:25","date_gmt":"2020-03-02T21:10:25","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=2976"},"modified":"2020-03-03T08:17:34","modified_gmt":"2020-03-03T14:17:34","slug":"how-to-install-htop-on-linux-centos-7","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=2976","title":{"rendered":"How to Install HTOP on Linux CentOS 7"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction to Installing htop on CentOS 7<\/h2>\n\n\n\n<p>Many sysadmins know about&nbsp;<em>top<\/em>, the standard process management and activity monitor that comes on most Linux systems. But there are times when top does not provide the information you\u2019re really looking for, or you want something that updates more frequently as the state of your system changes.<\/p>\n\n\n\n<p>Look no further than htop. It\u2019s interactive, real-time, and sports a variety of metrics and details above and beyond what top provides.<\/p>\n\n\n\n<p>You can see CPU utilization at a glance, and that\u2019s just the tip of the iceberg. Sort processes, kill rogue jobs right from htop, and set priorities. To learn more about htop, see the&nbsp;<a href=\"http:\/\/hisham.hm\/htop\/\">htop<\/a>&nbsp;website.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites to Installing htop on CentOS 7<\/h2>\n\n\n\n<p>To install htop on CentOS 7, you\u2019ll need a few things:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A CentOS 7 machine<\/li><li>Basic knowledge of Linux and how to use the shell<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Installing htop on CentOS 7: Two Methods<\/h2>\n\n\n\n<p>There are two different ways you can get htop on your computer. First, you can install it as a binary from your package manager (on CentOS this would be yum). This is a good option if you want to get it right away and don\u2019t much mind what version of htop you\u2019re getting.<\/p>\n\n\n\n<p>You can also install htop from source. Since htop is open-source, you can download the code and build it yourself on your system. This takes a little longer, but you can be sure you\u2019re getting the most updated build available (important if you\u2019re looking for a specific new feature).<\/p>\n\n\n\n<p>We\u2019ll go through both methods step by step.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install htop with Yum<\/h2>\n\n\n\n<p>The yum package manager does not contain htop by default. This is okay; we just need to add an EPEL repository so yum can find it. Here\u2019s the commands to add that repository:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>yum -y install epel-release<\/p><p>yum -y update<\/p><\/blockquote>\n\n\n\n<p>Now with the repository properly added, you can tell yum to install the htop process monitoring tool:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>yum -y install htop<\/p><\/blockquote>\n\n\n\n<p><br>If the installation completes successfully, you should be able to type&nbsp;htop&nbsp;at the command line and see the status of your system.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/cheapwindowsvps.com\/blog\/wp-content\/uploads\/2017\/10\/htop-2.0.png\" alt=\"htop\" class=\"wp-image-189\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>To learn more about htop\u2019s features and how to customize it, see the&nbsp;htop website&nbsp;or&nbsp;<a href=\"https:\/\/peteris.rocks\/blog\/htop\/\">htop explained<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install htop from Source<\/h2>\n\n\n\n<p>To ensure you have the most recent version of htop and all the new features, you can install htop from source. This involves downloading the source code and building it on your machine.<\/p>\n\n\n\n<p>Installing from source means you need to gather the dependencies yourself. Before we can install htop, we\u2019ll need&nbsp;<strong>Development Tools<\/strong>&nbsp;(gcc and other compilers) and&nbsp;<strong>ncurses.<\/strong><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>yum groupinstall &#8220;Development Tools&#8221;<\/p><p>yum install ncurses ncurses-devel<\/p><\/blockquote>\n\n\n\n<p>With the dependencies installed, we can grab the source code and extract it:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>wget http:\/\/hisham.hm\/htop\/releases\/2.0.2\/htop-2.0.2.tar.gz<\/p><p>tar xvfvz htop-2.0.2.tar.gz<\/p><p>cd htop-2.0.2<\/p><\/blockquote>\n\n\n\n<p>Now that we\u2019re in the folder with the htop source code, we can run these three commands to prepare and build the code:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>.\/configure<\/p><p>make<\/p><p>make install<\/p><\/blockquote>\n\n\n\n<p>Once the make install step completes, you should be able to use htop. Try typing&nbsp;htop&nbsp;into your terminal and you should see the system monitor appear.<\/p>\n\n\n\n<p>If you get a&nbsp;htop: command not found&nbsp;error, you\u2019ll need to specify the location of the htop executable in your PATH.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion: htop on CentOS7 Installed<\/h2>\n\n\n\n<p>There\u2019s so much you can do with htop, and we hope it will help monitor your processes more quickly and easily. As always, if you have questions please leave them in the comments below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction to Installing htop on CentOS 7 Many sysadmins know about&nbsp;top, the standard process management and activity monitor that comes on most Linux systems. But there are times when top does not provide the information you\u2019re really looking for, or you want something that updates more frequently as the state of your system changes. Look [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-2976","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2976"}],"version-history":[{"count":2,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2976\/revisions"}],"predecessor-version":[{"id":2986,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2976\/revisions\/2986"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}