Btop is a much-improved take on the Linux top command

Btop is a much-improved take on the Linux top command

If you’re on the hunt for an improved version of the Linux top command, Jack Wallen believes btop is the way to go.

server configuration command lines on a monitor
Image: ronstik/Adobe Stock

Over the years, I cannot tell you how many times I’ve had to use the Linux top command to troubleshoot problems on server and desktop deployments. It seems like top should be able to do more, which is why I’m always on the lookout for a replacement of that command.

On the desktop, there’s GNOME System Monitor, which is a well-designed GUI that makes managing processes simple. But even GNOME System Monitor has its limitations.

So when I came across a tool named btop, I was thrilled that it took that old standby and gave it much-needed features. Not only does btop list out various system usages including memory, disks, network and processes, but it also allows for interaction with the mouse. Even on a server installation, you can point and click your way around btop to view processes as a tree, hide or reveal certain displays, and access an options menu where you can tweak the look and feel of the display.

SEE: Top Linux commands admins needs to know (TechRepublic Premium)

The btop features list includes:

  • A game-inspired menu system
  • Full mouse support
  • Arrow keys process selection
  • Detailed stats for the selected process
  • Process filters
  • Easily switch between sorting options
  • Signal send to the selected process
  • Configuration via menu
  • Auto-scaling graph for network I/O
  • Shows IO activity/speeds for disks
  • Battery meter
  • Custom presets

What you’ll need to install and use btop

Btop can be installed on just about any Linux distribution from default repositories. I’ll demonstrate the installation on both a Ubuntu-based distribution and an RHEL-based distribution. Other than having a running instance of Linux, you’ll also need a user with sudo privileges. Let’s get to the installation.

How to install btop

On a Ubuntu-based distribution, which for me is Pop!_OS, the installation is accomplished with the command:

sudo apt-get install btop -y

If you’re on an RHEL-based Linux distribution such as Fedora or Rocky Linux, the installation command is:

sudo dnf install btop -y

How to use btop

From the terminal window, issue the command:

btop

You should immediately be greeted by the btop app (Figure A).

Figure A

Btop is running on Pop!_OS.

Using your mouse, you can click on any section to hide or reveal details and your arrow keys to navigate to a process. If you select a process, click your keyboard’s Enter key to reveal the details (Figure B).

Figure B

The details for containerd are revealed in btop.

If you click Menu at the top left, you can then select Options to access the configuration options available for the app (Figure C).

Figure C

The btop Options menu.

The menu is fairly straightforward, so you shouldn’t have any problem figuring out any of the options.

And that, my fellow Linux admins and enthusiasts, is how to get a much-improved version of top on your desktops and servers. Trust me when I tell you btop will have you leaving top behind without so much as a second of regret.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.

Source of Article