Bashtop is a TUI Linux resource monitor written in… Bash. It shows the usage / stats for the CPU (including temperature), memory, disks, network and processes.
This top-like tool is quite new, but it has already gained a lot of popularity. Due to requests to make it cross-platform, its developer is currently rewriting it to use the Python3 psutil library for data collection, instead of Linux-specific tools. [[Edit]] Bashtop now also works on macOS.
Bashtop lets you filter processes (press
f) and it has multiple sort options: sort by “cpu lazy”, “cpu responsive”, memory, pid, etc., by pressing the
→ keys on your keyboard. You can also show detailed information for a process, and terminate, kill or interrupt a selected process.
While many TUIs (text-based / terminal user interface) come with the ability to use the mouse to perform various operations, don’t try that with Bashtop as it has no mouse support. That doesn’t make it any less cool, especially when you take a look at its game-inspired menu (which you can open by pressing
Its menu isn’t just cool, it also shows the available keyboard shortcuts (under
Help), and lets you change the various Bashtop configuration options, which are otherwise available in a configuration file (
$HOME/.config/bashtop). From there you can change the theme (it can auto-download themes from its GitHub repository), the update interval, default process sorting, if it should show the CPU temperature, draw the clock, and more:
You may also like: s-tui CPU Monitoring And Stress Testing Tool
The UI is responsive, but it doesn’t show the same amount of information at all sizes. Depending on the terminal size you’ll see more / fewer processes in the process list, and more / less info about CPU, memory and disks.
It’s worth noting that the tool has a minimum terminal size requirement, which is 80×25. Most common terminal emulators have a default window size of 80×24, so you’ll need to slightly increase the window height to get Bashtop to work.
Bashtop should work on most modern Linux distributions with a truecolor capable terminal.
Since it’s written in Bash, installing Bashtop is as easy as downloading the bashtop script from its project page (or the release archive), and installing it somewhere in your PATH. It does have a few dependencies though that you’ll need to make sure are installed on your system (besides the optional dependencies, the others should already be installed in most cases):
- Bash (it needs version 4.4 or newer, so it won’t work on Ubuntu 16.04 or CentOS 7 for example)
- GNU Core Utilities
- GNU Grep
- ps from procps-ng (version 3.1.15 or newer, this is usually in a package called procps that you already have installed)
- lm-sensors for showing the CPU temperature (the package is usually called
lm_sensors; you need to run
sensors-detectas root after installation, to detect your computer’s sensors)
- curl for showing messages about Bashtop updates and the ability to download extra themes (the package is named
curlon most, if not all Linux distributions)
Check out more cool command line tools I’ve written about on Linux Uprising, by clicking here.