How to install htop on Ubuntu Linux using apt

Originally published at: https://www.cyberciti.biz/faq/how-to-install-htop-on-ubuntu-linux-using-apt/

I like htop output, but it is not installed by default on my Ubuntu cloud server. How do I install htop on Ubuntu Linux 18.04 LTS server?

Use this command to install htop: sudo apt install htop

This will run the command as administrator and tell apt to install the package htop, which you can then run by typing it’s name.
Do sudo apt update first if it doesn’t work.

This should also work on Debian I believe