Oracle linux install htop

How to Install and Use htop in Linux

htop is an excellent utility for monitoring system resources in Linux. It provides a better user experience than the default top command.

Windows has its famous task manager. Linux has several GUI and command line system monitors. Every Linux system comes with a couple of them. On the command line, the top command is perhaps the goto command for checking the system resource utilization quickly. Using top command apart from viewing the processes could be tricky. And this is where htop tops top. Pun aside, htop is a top-like utility but with a better and user-friendly interface. In this guide, I will be showing you how you can install and use htop in Linux.

Install htop utility in Linux

You won’t find htop pre-installed on the majority of Linux distributions but being one of the most popular utilities, you will find htop in default repositories of almost every Linux distro. So if your machine is powered by something that is based on Debian/Ubuntu, the following command should get your job done:

If you’re on something else or want to build from a source, you can always refer to htop’s GitHub page for detailed instructions. Once you’re done with the installation, you just have to use the htop command in the terminal, and it will reflect all the ongoing processes in your system:

install and use htop

In htop, there is a color coding for the individual section, so let’s have a look at what each color indicates while using htop.

What different colors and statistics indicate in htop

CPU usage bar

cpu process in htop

  • Green: Resources consumed by user processes.
  • Blue: Indicates low-priority threads.
  • Red: CPU resources used by system (kernel) processes.
  • Aqua blue: Indicates virtualized processes.

Memory bar

memory bar in htop

  • Green: Memory being utilized by system processes.
  • Blue: Memory used by buffer pages.
  • Orange: Memory allocated for cache pages.

Statistics

task statistics in htop

  • Tasks: 166 shows there is a total of 166 ongoing processes.
  • 1249 thr indicates that those 166 processes are handled by 1249 threads.
  • 1 running indicates that from those 166 processes, only one task is in a state of running.
  • The load average indicates the average system load over a period of time. Since my system is Hexa-Core, anything under 6.0 is ok. This number may exceed, such as 6.1, so the upcoming processes have to wait for ongoing tasks to be completed.
  • 1.86 is the average load for the last minute.
  • 1.75 is the average load for the last 4 minutes.
  • 1.47 is the average load for the last 15 minutes.
  • Uptime tells how long the system has been running since last reboot.
Читайте также:  Linux mint удаление mysql

Now, let’s jump to the actual implementation part.

How to use htop in Linux

As the htop is mainly used to check for system resources, let’s have a look at how you can sort the processes based on resource consumption.

Sort processes based on Resource Consumption

The easiest way to sort processes based on CPU and memory usage is to use your mouse pointer. Hover the cursor over the CPU or Memory section and click on any of those.

And there you will see an icon of a triangle △ and based on that you can sort the process based on highest to lowest resource consumption:

But if you are dealing with remote servers, you might not have the privilege to use a mouse and in those cases, you can use keyboard shortcuts.

Press F6 and it will bring up every option available to sort the ongoing processes:

sort processes in htop using keyboard shortcut

You can use arrow keys to select a preferred sorting option and then press the Enter key, results should reflect as intended.

Search for a specific process

If you want to look for a specific process and its resource consumption, you can press F3 and it will get you a search prompt as shown below:

search processes in htop

For example, I searched for htop, and it highlighted the process with light orange color. And you can press F3 for the next result.

Filter ongoing processes

While searching may get you the intended results, I find the filtering process using keywords even more effective as it presents a list of processes.

To filter processes, you have to press F4 and type the name of the process. For example, I filtered processes related to gnome-boxes:

filter processes in htop

Kill process

Once you made it to find the most resource-hungry and unnecessary process, you just have to press F9, and it will present you with termination signals:

kill process in htop

I can’t cover all 15 termination signals, we have a separate guide on different termination signals, so you can refer to that guide if you intend to learn more about them.

But I will recommend you use SIGTERM first, as it is the most efficient and friendly way to kill the process.

Customize htop

Here, my aim is to add a date and time and change the color scheme to monochrome.

First, press F2, and it will being setup prompt allowing users to change how htop looks:

customize htop in ubuntu

First, hover to the Colors sections and press Enter and it will allow us to change the color scheme. From there, select the Monochrome option and press Enter to save changes:

change htop colors in linux

Now, go back to the setup option, and from there, use the left arrow key to explore available meters:

Читайте также:  Linux карманный справочник скотт граннеман linux карманный справочник

explore available meters in htop

As I intend to add the Date and time, I have to press Enter once I find the option for it.

Here, it will allow you to place the date and time in any of the left and right columns and you can use the up and down arrow keys to change the order of columns.

So I placed the date and time meter with the last styling option (you can change styles using the spacebar):

add date and time htop

Once you are done aligning the date and time meter, press the enter key to save changes and F10 to close the setup prompt.

More than htop?

htop is good. But there are other similar tools that might be better than it. Check them out if you want to.

In this guide, I explained how you can install the htop utility in different Linux distributions and how you can use some basic functionalities of htop to manage system resources efficiently.

But htop can do a lot more and for that and to learn more, you can always refer to its man page, and we have a detailed guide on how you can get the most out of the man page in Linux.

Источник

htop.x86_64 on Oracle Linux 8

Please follow the steps below to install htop.x86_64 package:

2. Uninstall / Remove htop.x86_64 package

In this section, we are going to explain the necessary steps to uninstall htop.x86_64 package:

3. Details of htop.x86_64 package

Last metadata expiration check: 2:20:35 ago on Mon Sep 12 02:51:38 2022.
Available Packages
Name : htop
Version : 3.2.1
Release : 1.el8
Architecture : x86_64
Size : 170 k
Source : htop-3.2.1-1.el8.src.rpm
Repository : epel
Summary : Interactive process viewer
URL : http://hisham.hm/htop/
License : GPLv2+
Description : htop is an interactive text-mode process viewer for Linux, similar to
: top(1).

4. References on Oracle Linux 8

pcp-webapi.x86_64 (4.3.2)

perl-Glib-Object-Introspection.x86_64 (0.048)

lklug-fonts.src (0.6)

mozc.x86_64 (2.23.2815.102)

hyphen-ta.noarch (0.7.0)

slang-devel.i686 (2.3.2)

libwayland-client.i686 (1.19.0)

php70-php-pecl-vips.x86_64 (1.0.13)

xz.x86_64 (5.2.4)

texlive-lib.i686 (20180414)

kf5-kiconthemes-devel.x86_64 (5.88.0)

glibc-langpack-en.x86_64 (2.28)

perl-Archive-Tar.src (2.38)

nmstate-plugin-ovsdb.noarch (1.2.1)

uwsgi-plugin-airbrake.x86_64 (2.0.20)

bitcoin-core-selinux.noarch

Источник

How to install htop Linux: Ubtunu, Mint

How to install htop Linux: Ubtunu, Mint

While the top utility gives us a basic overview of the processes running on your Linux system, the htop utility goes further, by giving us additional information about the processes and also allow several manipulations.

How to install htop on Linux?

To install htop, sort the list of processes using criteria such as: CPU usage, memory, virtual memory, and others and then, search for a process. Next, kill the process.

Automatic installation from repositories

The htop package exist for most of the Linux distributions, thus allowing easy installation via the package manager! This is the generic procedure to be used:

  • NB: all commands are entered as root (admin), alternatively you can use the sudo program to execute a command as root (Ubuntu/Kubuntu/Lubuntu/Xubuntu).

Installation in Debian, Ubuntu, Linux Mint and derivatives (Kubuntu, Lubuntu, Xubuntu, LMDE, etc)

The first thing to do, is to verify if your repositories are up-to-date

Читайте также:  Linux add authorized keys

The next step is to install «htop»:

The «-y» argument above, automatically accepts the package installation!

Fedora, CentOS, RedHat and others

For these distributions, you will notice that htop package is generally missing from official repositories. It is therefore necessary to use the «EPEL» repositories:

Fedora

CentOS, RHEL, Scientific Linux and other

Installing EPEL repositories:

If the «epel-release» package does not exist, you will need to install it manually: RHEL/CentOS 7.X

rpm -ivh https://mir01.syntis.net/epel/7/$(arch)/e/epel-release-7-5.noarch.rpm
rpm -ivh http://fr2.rpmfind.net/linux/epel/6/$(arch)/epel-release-6-8.noarch.rpm
rpm -ivh http://mirror.in2p3.fr/pub/epel/5/$(arch)/epel-release-5-4.noarch.rpm

Gentoo

Simply use emerge to install the package.

Manual installation from sources

A manual installation from sources may be required when:

  • The htop package is not available for your system
  • You want to run the latest version of htop and it is not yet available for your system.

Installation and compilation of htop should work on most systems provided you have the right tools! We’ll start by downloading the sources:

wget http://hisham.hm/htop/releases/1.0.3/htop-1.0.3.tar.gz

Then we will extract this archive:

And now we will compile our tool:

cd htop-1.0.3 ./configure; make; make install

Launch htop

Normally, if your installation was successful and has returned an error message, you run htop with the following command:

  • Linux install htop
  • Htop linux install
  • Install .tar.gz in ubuntu > Guide
  • Play store app install > Download — App downloads
  • Install duckduckgo > Guide
  • Net extender install > Download — VPN
  • Ubuntu install bison > Guide

Linux

  • How to compile assembly code with NASM: in Linux, Windows
  • Debian change language: to English, command
  • Linux read file line by line: for loop
  • Change password Linux: script, terminal, Samba
  • Debian add printer: command line, install cups, by IP
  • Search in Vim editor: Linux, for words
  • Vim autocomplete: C++, command
  • How to disable avahi-daemon: Linux, Ubuntu, CentOS
  • How to convert DOS to UNIX: Linux, command
  • How to recover lost admin password in CUPS?
  • Adding space in mount point: to FSTAB
  • How to remove the content of a directory: Linux
  • Restoring Linux: from backup, using Tar
  • How to resize partition Linux: Gparted, command line
  • How to split a file in Linux: split, merge
  • What is a Daemon: in Linux
  • Linux display file in reverse order
  • Customize Wine on Linux: download, install, locate theme
  • How to uninstall package: in Linux
  • Restart network interface: Linux, Ubuntu
  • How to create commands in Linux?
  • Delete lines in Linux: SED, commands

This information will be transmitted to CCM Benchmark Group to ensure the delivery of your newsletter.

It will also be used, according to your selected preferences, to provide you with more relevant advertisements.

You have the right to access and modify your personal data, as well as to request its suppression, within the limits foreseen by the legislation in force.

You can also change your preferences regarding the advertisements you receive at any time. For more information, please check our privacy policy. Processing of Personal Data.

Источник

Оцените статью
Adblock
detector