tree
A command-line program that lists the contents of directories as an indented tree.
These buttons open the developer's own site, repository or store listing in a new tab. wares.gg does not host downloads.
1 more ways to get tree
Package managers
- Homebrew
brew install tree
About tree
tree is a long-running command-line utility that prints a directory and everything below it as an indented tree, making the structure of a project or folder easy to see at a glance.
Beyond plain text, its source includes color output, filtering and output in HTML, JSON and XML, which is useful for scripts and documentation. Version 2.3.2 is current, with source changes in March 2026. It is distributed as source tarballs under the GPLv2 and mirrored on GitHub and GitLab.
Strengths
- Simple, familiar way to view a folder hierarchy
- HTML, JSON and XML output options
- Still actively maintained
Limitations
- Distributed mainly as source code to build
- Large directory trees can produce very long output
Details
- Pricing
- FreeFree and open source under the GPLv2.
- License
- GPL-2.0
- Developer
- Old Man Programmer
- Platforms
- Linux, Command line
- How it runs
- Downloadable app
- Account
- Not required
- Works offline
- Yes
- Best suited for
- Seeing the structure of a directory from the terminal
- Categories
- CLI tools
- Last verified
- Added
- Provenance
- Facts checked against the developer's own pages and store listings, 1 sources on file.
Alternatives to tree
Compare allSoftware that can replace tree for an important use case, and what changes if you switch.
eza
A replacement for ls with colours, icons, a tree view and Git status in the listing.
eza provides a tree view with -T along with colours, icons and Git status, ships as one binary for Windows, macOS and Linux, but lacks tree's HTML output.
erdtree
A multi-threaded command-line tool that shows a directory tree together with disk usage.
erdtree shows the directory tree together with disk usage, honours .gitignore rules and runs multi-threaded on Windows, macOS and Linux, with infrequent releases.
LSD
List files with icons, colors and tree views.
LSD offers tree views with icons and colours on Windows, macOS and Linux under Apache-2.0, though icon display needs a suitable terminal font.
Similar software
Related functionality, not necessarily a direct replacement.
tere
Move between directories with an interactive terminal browser.
Walk
A minimal terminal file navigator that replaces cd and ls for browsing directories.
lf
A fast terminal file manager in the ranger style, as a single binary with no runtime dependencies.
pdu (parallel-disk-usage)
A command-line directory tree analyzer that measures disk usage in parallel and prints a size chart.
GNU Coreutils
The core GNU file, shell and text utilities, including ls, cp, mv and sort.