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 both server and desktop deployments. Top has always been one of those tools that never fails to feel as if it should be able to do more but never can. That’s why I’m always on the lookout for a top replacement.

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

So when I came across a tool named btop, I was pretty thrilled to see that it took that old standby and gave it some much-needed features. Not only does btop list out various system usages (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: 40+ open source and Linux terms you need to know (TechRepublic Premium)

The feature list of btop includes the likes of:

  • 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

Let’s install btop and see how it’s used.

What you’ll need

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 — for me, that’s 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 link