In this guide, we will show you how to install and use htop in Fedora systems.
htop is an interactive system-monitor process-viewer and process-manager. It is designed as an alternative to the Unix program top.
It’s a command line utility that allows the user to interactively monitor the system’s vital resources or server’s processes in real time. htop supports mouse operation, uses color in its output and gives visual indications about processor, memory and swap usage.
Installation of htop on Fedora
Follow the steps below to install htop
- Update your Fedora system packages as follows:
sudo dnf update -y && sudo dnf upgrade -y
- htop is available on Fedora systems base repository. so run the command below to install it
sudo dnf install htop
- Also you can install Htop from the official source by downloading the latest htop from the Github page as shown below:
- Extract the downloaded tarball
tar xfvz htop-3.2.0.tar.xz
- Run the below commands to compile it.
cd htop-3.2.0/ ./configure make sudo make install
How to use htop
Once installed, type htop on the command line to launch the Htop interface on Fedora:
Options of htop
- -C –no-color –no-colour : Start htop in monochrome mode.
- -d –delay : Used to show the delay between updates, in tenths of seconds.
- -p –pid=PID, PID… : Used to show only the given PIDs.
- -s –sort-key COLUMN : Sort by this column (use –sort-key help for a column
- -h –help : Used to display the help message and exit.
- -u –user=USERNAME : Used to show only the processes of a given user.
Example to show the processes for a specified user:
htop -u unixcop
-v –version : Output version information and exit.
- Arrows, Page Up, Page Down, Home, End: Scroll the process list.
- Space: Tag or untag a process.
- s – Trace process system calls.
- U – Untag all processes (remove all tags added with the Space key).
- F1 – Help
- F2 – setup
- F3 – search
- F4 – filtering: type in part of a process command line and only processes whose names match will be shown.
- F5 – Tree view.
- F6 – Sorting.
- F7 – Increase the selected process’s priority. This can only be done by the superuser.
- F8 – Decrease the selected process’s priority.
- F9 – Kill process.
- F10 – Quit.
To go to the help page of htop, press F1 button
In this tutorial, we showed you how to install and use htop in Fedora 36