The standard GNU coreutils ls command has listed directory contents for decades, but its default output is monochromatic, utilitarian, and lacking integration with modern developer workflows. As the actively maintained, community-driven successor to the popular but unmaintained exa project, eza modernises directory inspection in Linux. Written in Rust, eza brings high-contrast file-type colouring, built-in Git status indicators, human-readable file sizes, symlink resolution, and integrated directory tree rendering to the command line.
Installing eza Across Linux Distributions
Because eza is rapidly gaining adoption, it is available across the official and semi-official repositories of major distributions:
- Ubuntu and Debian: Add the official community GPG key and repository:
sudo apt update && sudo apt install -y gpg wget sudo mkdir -p /etc/apt/keyrings wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list sudo apt update && sudo apt install -y eza - Fedora, RHEL, and CentOS:
sudo dnf install eza - Arch Linux and Manjaro:
sudo pacman -S eza - Cargo (Universal Rust Package Manager):
cargo install eza
Basic Usage and Visual Improvements
Executing eza in place of ls immediately demonstrates visual enhancements:
- Basic Directory Listing:
ezaRenders files in clean columns, colour-coding directories in dark blue, executables in green, compressed archives in red, and image assets in purple.
- Include Hidden Files: Use the standard
-a(or--all) flag:eza -a - Detailed Long-Format Table: Use the
-l(or--long) flag to output file permissions, byte counts, owner names, and modification timestamps formatted for scannability:eza -l
Git Integration and File Status Indicators
One of eza‘s premier features for developers is native Git repository awareness. When listing files inside a Git repository, adding the --git flag displays tracking status directly alongside permissions:
eza -l --git
The Git column indicates status using distinct two-letter markers:
- -N: New, untracked file.
- -M: Modified file containing uncommitted changes.
- -I: Ignored file matching a rule inside
.gitignore. - -A: Staged file added to the Git index ready for commit.
Generating Recursive Directory Trees
Traditionally, viewing directory hierarchies required installing the separate tree utility. eza integrates recursive tree rendering natively via the -T (or --tree) flag:
- Full Directory Tree:
eza --tree - Depth-Restricted Tree: Limit the traversal depth using
-Lto prevent terminal flooding in large repositories:eza --tree -L 2 - Detailed Tree with Permissions: Combine flags for an informative hierarchical overview:
eza -l --tree -L 2 --git
Configuring Shell Aliases to Replace ls
To integrate eza seamlessly into your daily terminal workflow, configure shell aliases inside your ~/.bashrc or ~/.zshrc profile:
# Replace standard ls with eza defaults
alias ls="eza --icons=auto --group-directories-first"
alias ll="eza -la --icons=auto --group-directories-first --git"
alias lt="eza --tree --level=2 --icons=auto"
After saving your configuration, run source ~/.bashrc (or source ~/.zshrc). Your terminal will now provide rich, colourised, and Git-aware file listings automatically, delivering a significant boost to daily command-line productivity.