How to Install and Use erdtree (et) in Linux for Fast Multi-Threaded File Tree Visualisation

Navigating nested directory structures and identifying large files or bloated directory hierarchies are daily tasks for Linux engineers. For decades, system administrators have alternated between the standard tree command to visualise folder layouts and du to calculate disk space. However, neither tool natively merges multi-threaded disk traversing with responsive terminal visuals. The modern Rust-based utility erdtree (executed via the binary et) unites the capabilities of tree, du, and find into a high-speed, modern filesystem visualizer.

What Is erdtree and Why Use It in Modern Linux?

Developed with performance and aesthetics in mind, erdtree is a multi-threaded filesystem traverser that analyses directory trees in parallel. Unlike legacy tools that pause during synchronous directory reads across large storage volumes, erdtree offers several compelling advantages:

  • Integrated Disk Usage Metrics: Computes cumulative folder weights and human-readable sizes directly alongside tree branches.
  • Multi-Threaded Traversal: Uses parallel worker threads to scan high-capacity SSDs and multi-terabyte filesystems significantly faster than single-threaded utilities.
  • Native Icon and Glyph Support: Automatically renders file-type icons and directory indicators using Nerd Fonts.
  • Git Repository Awareness: Natively respects .gitignore rules by default, filtering out noisy node_modules or build artefacts unless explicitly overridden.

Installing erdtree on Linux

Depending on your distribution and software preferences, you can install erdtree using Rust’s package manager, distribution repositories, or pre-built release binaries.

Method 1: Installing via Cargo

If you have Rust configured on your machine, compile and install erdtree directly from crates.io:

cargo install --locked erdtree

Ensure that your local Cargo binary folder (~/.cargo/bin) is present in your active $PATH.

Method 2: Installing on Arch Linux

Arch Linux users can install erdtree through the Arch User Repository (AUR) using an AUR helper such as yay or paru:

yay -S erdtree

Method 3: Installing Pre-Compiled Binaries

On Debian, Ubuntu, Fedora, or enterprise distributions, download the pre-compiled binary from the official GitHub releases:

curl -s https://api.github.com/repos/solidiquis/erdtree/releases/latest \
  | grep "browser_download_url.*linux.*tar.gz" \
  | cut -d : -f 2,3 \
  | tr -d \" \
  | wget -qi -
tar -xzf erdtree-*.tar.gz
sudo mv erdtree /usr/local/bin/et

Basic erdtree Commands and Essential Flags

Once installed, launch the utility by calling et in your chosen directory:

et

By default, erdtree outputs a colour-coded hierarchical tree detailing file names, cumulative directory weights, and human-readable size prefixes.

Restricting Depth Traversal

In deep codebases or large storage drives, unrestricted trees can quickly scroll past your screen buffer. Restrict visual depth using the -L or --level parameter:

et -L 2

Sorting by File and Directory Size

To identify the largest directories or files at a glance, sort the output branches by size rather than alphabetical name:

et -s size

Alternatively, sort by modification timestamp to inspect recently edited files:

et -s mtime

Advanced Customisation, Filtering, and Icon Display

Customise your terminal experience using granular display modifiers designed for developer workflows.

Enabling Nerd Font Icons

If your terminal emulator uses a Nerd Font (such as FiraCode Nerd Font or JetBrainsMono NF), pass the -i or --icons flag to display file icons for programming languages, images, archives, and configuration files:

et -i

Inspecting Hidden Files and Bypassing Git Rules

While erdtree automatically hides hidden dotfiles and respects .gitignore definitions, you can expose these items when conducting system audits:

et -H --no-git

The -H flag displays hidden items, while --no-git disables .gitignore filtering to expose ignored dependencies and cache directories.

Filtering Files by Glob Patterns

To restrict the tree display to specific file types, such as source code or configuration files, supply the glob pattern parameter:

et -g "*.json"

Displaying Flat Disk Usage Analysis

In addition to traditional hierarchical trees, erdtree can operate as a high-speed disk usage reporter similar to ncdu or gdu:

et --disk-usage -L 1

This command summarises the exact storage weight of top-level directories in parallel, making it an indispensable tool for server maintenance and disk cleanup routines.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.