Bye htop, hello bashtop

This article will show you how to install the bashtop, a contemporary htop replacement

Bye htop, hello bashtop

One of the first things I install when setting up a new Linux installation is htop - it's a defacto process manager for Linux command line. It has been around for quite some time, since 2004 to be exact. Recently, a modern, good looking replacement showed up - Bashtop.

Why Bashtop?

First of all, htop is written in C programming language which means it has some dependencies needed  to run graphical-like user interface in terminal. On the other hand, bashtop is entirely written as a single bash script so all you need to run it is bash shell and couple more utils which are pretty much standard to nowadays Linux distributions - awk, sed, GNU coreutils...

Fun fact - the main motivation for this app to be written in bash script is that the developer wanted to learn bash scripting

It provides much more information about hardware than htop CPU model, per-thread usage histogram, usage percentage and temperature. It also displays info about hard drives, network transfers etc. Also, it is super-easy to install and use, it looks amazing and refreshing.

It also supports themes! It comes with both dark and light themes out of the box. FTW!

These are some key features as listed on it's GitHub repo page:

  • Easy to use, with a game inspired menu system.
  • Fast and "mostly" responsive UI with UP, DOWN keys process selection.
  • Function for showing detailed stats for selected process.
  • Ability to filter processes.
  • Easy switching between sorting options.
  • Send SIGTERM, SIGKILL, SIGINT to selected process.
  • UI menu for changing all config file options.
  • Auto scaling graph for network usage.
  • Shows message in menu if new version is available
  • Shows current read and write speeds for disks
  • Multiple data collection methods which can be switched if running on Linux

How to install Bashtop on Ubuntu 20.04 or Elementary OS 5.1

There are basically two methods and both are really simple to follow along. Whole bashtop app is a single bash shell script, a single executable file. No need to build or install anything.

Method 1: Manual installation using Git - Any Linux distro, OSX, FreeBSD

You will need to have Git installed before you continue.

cd ~
git clone [email protected]:aristocratos/bashtop.git
cd bashtop
make install

That's it! now you can close and reopen you terminal or simply reload your .bashrc or .zshrc and you are ready to go!

In your terminal run bashtop whenever you wish to have a look or kill some process.

If you ever wish to uninstall bash top that was installed this way, you can easily do that by running this command

cd ~/bashtop
make uninstall
cd ..
rm -rf bashtop

Method 2: Ubuntu and Elementary OS - install from ppa repo

Run the following commands in terminal

sudo add-apt-repository ppa:bashtop-monitor/bashtop
sudo apt update
sudo apt install bashtop

Uninstall as any other app installed using apt-get

 sudo apt-get --purge remove bashtop
 sudo apt-get autoremove

CPU Core temperature:

for ubuntu, elementary os, and other debian-based distros

One of the most awesome features bashtop provides is temperature for each individual CPU core/thread. For bashtop to be able to show the temperature, you will need to install one of the libraries that are can obtain and provide that info. Simply run this command in terminal and next time you run bashtop it will show you temperature readings for CPU cores.

sudo apt-get install lm-sensors 
You can learn more about installation on different linux distros on the bashtop GitHub repo

Options menu

Bashtop comes with various settings - from themes to refresh rate at which data on the screen will be refresh at. To access this menu just press ESC.

Select OPTIONS then press Enter key

Themes

There are 10 additional themes that come together with the installation. Select Themes option and press Enter key to tell bashtop to look for new themes in the themes directory.

 Change the theme using left and right arrow keys

Keyboard shortcuts

To learn about different keyboard shortcuts you can use, go to the OPTIONS menu, and then select HELP

Conclusion

Bashtop is certainly a refresh and interesting how terminal apps can look amazing.  I hope this article has inspired you to give bashtop a chance and you enjoy using it.


References and useful resources

https://github.com/aristocratos/bashtop
https://computingforgeeks.com/bashtop-resource-monitor-for-linux-macos-freebsd/
https://www.youtube.com/watch?v=nyx9AqaqUgA
https://www.youtube.com/watch?v=A6fdSHtPHAM