Let us see all steps and command in details.

 

Alpine Linux install htop

 

Let us search for htop package using apk command:

apk search htop

 

Sample outputs:

htop-doc-2.2.0-r0
htop-2.2.0-r0
varnish-6.1.1-r0

 

htop package

Run the following command:

apk info htop

 

Sample outputs:

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:
200704

 

Install htop

 

Finally, type:

apk add htop

 

How to use htop command

The syntax is:

htop
htop [options]

 

One can use a monochrome color scheme, run:

htop -C
htop --no-color

 

Want to see the tree view by default when running htop? Try:

htop -t
htop --tree

 

Let us see only processes of a given user named vyga:

htop -u vivek
htop --user=vivek
htop --user=nginx

 

Limit and show process for only the given PIDs:

htop -p PID
htop -p PID1,PID2
--pid=PID,[,PID,PID...]
htop -p 1342
htop -p 7435,1367

 

How to get help about htop

Simply type:

htop --help
man htop

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)