Install erdtree on Ubuntu 24.04

Install erdtree on Ubuntu 24.04

The erdtree is a command line tool designed for displaying directory trees in a more visual and user-friendly manner. It offers a more readable and colorful alternative to traditional tools like tree. This tutorial explains how to install erdtree on Ubuntu 24.04.

Install erdtree

Execute the following command to retrieve the latest version tag of the erdtree release and save it in a variable:

ERDTREE_VERSION=$(curl -s "" | grep -Po '"tag_name": "v\K[0-9.]+')

Download the tar.gz file from the releases page of the erdtree repository:

wget -qO erdtree.tar.gz$ERDTREE_VERSION-x86_64-unknown-linux-gnu.tar.gz

Extract executable to /usr/local/bin directory:

sudo tar xf erdtree.tar.gz -C /usr/local/bin erd

We can verify the erdtree version in the following manner:

erd --version

Remove unneeded file:

rm -rf erdtree.tar.gz

Testing erdtree

Use the following erd command to display a directory tree of the current directory, showing only the top level and including hidden files:

erd --level 1 --hidden

To display the directory tree of a specific directory, supply the directory path as an argument. For example, to examine the /usr/local directory, use this command:

erd --level 1 --hidden /usr/local
Directory tree of /usr/local directory using erdtree on Ubuntu

Uninstall erdtree

To uninstall erdtree, remove the related file:

sudo rm -rf /usr/local/bin/erd

Leave a Comment

Cancel reply

Your email address will not be published.