How To Install Htop on Alpine Linux

This post will guide you how to install htop tool on your Alpine Linux system. How do I install htop package using apk command under your Alpine Linux.

how to install htop on alpine linux2

Htop Command


Htop is a free (GPL) ncurses-based process viewer for Linux.It is similar to top, but allows you to scroll vertically and horizontally, so you can see all the processes running on the system, along with their full command lines, as well as viewing them as a process tree, selecting multiple processes and acting on them all at once.

The syntax of the htop command is as follows:

htop [-dChustv]

Options:

-d --delay=DELAY
Delay between updates, in tenths of seconds

-C --no-color --no-colour
Start htop in monochrome mode

-h --help
Display a help message and exit

-p --pid=PID,PID...
Show only the given PIDs

-s --sort-key COLUMN
Sort by this column (use --sort-key help for a column list)

-u --user=USERNAME
Show only the processes of a given user

-v --version
Output version information and exit

-t --tree
Show processes in tree view

Installing Htop Using Apk


Before installing htop package on your Alpine Linux system, and you can search for htop packge if it is available in the default Alpine repository. type:

$ apk search htop

Outputs:

localhost:~# apk search htop
htop-doc-2.2.0-r0
htop-2.2.0-r0
varnish-5.2.1-r0
htop-2.0.2-r0

If you want to get more info about htop package in the default repository of Alpine Linux, you can type the following apk info command, type:

$ apk info htop

Outputs:

localhost:~# apk info htop
htop-2.0.2-r0 description:
An interactive process viewer

htop-2.0.2-r0 webpage:
http://hisham.hm/htop/

htop-2.0.2-r0 installed size:
188416

htop-2.2.0-r0 description:
Interactive process viewer

htop-2.2.0-r0 webpage:
http://hisham.hm/htop

htop-2.2.0-r0 installed size:
196608

Now you can install htop tool by running the following apk add commad in your Alpine Linux, type:

$ apk add htop

Outputs:

localhost:~# apk add htop
(1/1) Installing htop (2.2.0-r0)
Executing busybox-1.30.1-r2.trigger
OK: 21 MiB in 34 packages
localhost:~#

Once htop package is installed on your Alpine Linux, and you can type the following command to verify the installation, type:

$ htop --version

Outputs:

localhost:~# htop --version
htop 2.2.0 - (C) 2004-2018 Hisham Muhammad
Released under the GNU GPL.

Using Htop on Alpine


If you want to see all the processes running on your Alpine system, and just type the following command:

$ htop

how to install htop on alpine linux1

If you want to see more help about htop command, and you can run the following commands:

$ man htop

or

$ htop --help

Outputs:

localhost:~# htop --help
htop 2.2.0 - (C) 2004-2018 Hisham Muhammad
Released under the GNU GPL.

-C --no-color Use a monochrome color scheme
-d --delay=DELAY Set the delay between updates, in tenths of seconds
-h --help Print this help screen
-s --sort-key=COLUMN Sort by COLUMN (try --sort-key=help for a list)
-t --tree Show the tree view by default
-u --user=USERNAME Show only processes of a given user
-p --pid=PID,[,PID,PID...] Show only the given PIDs
-v --version Print version info

Long options may be passed with a single dash.

Press F1 inside htop for online help.
See 'man htop' for more information.

Conclusion


You should know that how to install htop tool using apk add command in your Alpine Linux system.

You might also like:

Sidebar



back to top