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 Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.