A command-line file manager
Nimble Tree Climber
The broot file manager guarantees clearer, quicker navigation of the directory tree at the command line.
You most likely use a file manager daily to do a variety of tasks from navigating the filesystem to creating, deleting, moving, and copying files. File managers come in many shapes and sizes, from command-line-only tools to the many Norton Commander clones (e.g., Midnight Commander) to graphical tools such as Dolphin (KDE), Nautilus (Gnome), Thunar (Xfce), or PCManFM (LXDE). In particular, if you have ever had to work with Windows Explorer, you will probably appreciate a good file manager.
Amongst the plethora of file managers, broot (pronounced "be root") clearly stands out from the competition in terms of functionality. Broot, an interactive file manager for the command line written in Rust, offers an innovative concept. It replaces commands such as ls
and tree
with an interactive display.
Copied from tree
Broot is maintained on GitHub [1] and works on Linux, Raspberry Pi OS, macOS, and Windows. Even in very large directories, this nimble file manager provides the user with a better and quicker overview. In principle, broot's display is based on the output from the tree
command (Figure 1). However, broot displays the directory tree in a more compact way and makes the display interactive, in contrast to tree
. You can search broot's tree display at lightning speed using fzf [2], a fuzzy search tool.
Setup
In addition to the GitHub repo, the developers maintain a project website that also provides instructions for broot's installation [3] and configuration. On this site, you also will find binary packages for Android, Linux, Linux with musl, Raspberry Pi, and Windows 10.
You can also find broot in the package archives of Alpine Linux, Arch Linux, Manjaro, Solus, Void Linux, and the BSD derivatives NetBSD and FreeBSD. However, be warned that some of these versions are partially outdated [4]. For distributions with deb package management, a third-party repository offers broot along with other interesting applications [5]. There is also a deb package available without a repository [6], but you must handle the updates manually if you go this route. This deb package works for testing purposes and removes the need to integrate the key for third-party repositories, a feature that Debian recently made less user-friendly [7].
For a permanent installation, I advise building broot yourself from source (Listing 1). To do this, you need a Rust development environment [8], which will give you the latest version. Broot stores its configuration in your home directory in ~/.config/broot/conf.hjson
; see the website [3] for a detailed description.
Listing 1
Building broot
$ git clone https://github.com/Canop/broot.git $ cargo install --path .
Retrofit
When you first launch broot, it asks if it can retrofit the br
shell function (Figure 2). You will want to allow this since it lets you use the cd
command to change directories inside broot. In the future, you can simply start broot with the br
command, followed by the path of the directory you want to view. If you save the path specification, the tool displays the contents of the current working directory.
While inspired by the tree
command, there are some differences. If you compare the output of tree
and broot side by side, you will notice that broot displays the same directory more compactly because it doesn't open all the directories immediately (Figure 3). You can navigate the tree at the keyboard and then press Enter to open a directory. In many terminals, you can also double-click to do this. To go back, press Esc.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.