Terminal GuideTerminal Guide
eza icon

eza

Modern CLI
macOSLinuxWindows
Rust

Modern ls replacement with colors, icons, and Git status.

Official Website

Features

Color OutputIconsGit StatusTree ViewExtended Attributes
Replaces
ls

Installation

Homebrew
brew install eza
Pacman (Arch)
pacman -S eza
Cargo (Rust)
cargo install eza

Why Use eza?

eza is a modern and feature-rich file listing tool that completely replaces the traditional ls command. Highly visible color output and Git integration significantly improve daily work efficiency.

Color Output and File Type Detection

Distinguish file types (directories, executables, symlinks, etc.) by color. Instantly recognizable at a glance.

Icon Display

Nerd Fonts support displays icons for each file type. Visually beautiful and intuitive to operate.

Git Integration

Display Git status for each file (new, modified, ignored, etc.). Repository state is instantly clear.

Tree View

Display directory structure in tree format. Understand project structure without the tree command.

Basic Usage

List Files

Basic Commands
# Display current directory
eza

# Display specific directory
eza /path/to/directory

# Detailed display (permissions, size, date, etc.)
eza -l

# Show hidden files
eza -a

# Detailed display + hidden files
eza -la

Output Example

drwxr-xr-x - user 20 Jan 10:30 [DIR] src/
drwxr-xr-x - user 19 Jan 15:22 [DIR] node_modules/
.rw-r--r-- 2.1k user 20 Jan 09:15 [JS] package.json
.rw-r--r-- 847 user 18 Jan 14:30 [MD] README.md
.rw-r--r-- 156 user 17 Jan 11:00 [TS] tsconfig.json

Colors and icons are displayed according to file type (when using Nerd Fonts)

Common Options

OptionDescriptionExample
-lDetailed display (long format)eza -l
-aShow hidden fileseza -a
-TTree vieweza -T
-LSpecify tree deptheza -T -L 2
--iconsDisplay iconseza --icons
--gitDisplay Git statuseza -l --git
--git-ignoreExclude .gitignore fileseza --git-ignore
-hHuman-readable file sizeseza -lh
-rSort in reverse ordereza -lr
-sSpecify sort methodeza -s size
-dDisplay directory itself (not contents)eza -ld */
--group-directories-firstShow directories firsteza --group-directories-first

Practical Usage Examples

Tree View

Tree View
# Display directory as tree
eza -T

# Tree view with depth 2
eza -T -L 2

# Tree with icons
eza -T --icons

# Tree excluding Git-untracked files
eza -T --git-ignore
.
├── src
│ ├── components
│ │ ├── Button.tsx
│ │ └── Header.tsx
│ └── App.tsx
├── package.json
└── README.md

Git Integration

Git Integration
# Display Git status (combined with detailed view)
eza -l --git

# Display Git repository state with icons
eza -l --git --icons

# Highlight modified files with color
eza -l --git --git-repos
.rw-r--r-- 2.1k user 20 Jan N- new-file.ts (newly added)
.rw-r--r-- 847 user 19 Jan M- modified.ts (modified)
.rw-r--r-- 156 user 18 Jan -- unchanged.ts (unchanged)

Git status: N=new, M=modified, D=deleted

Icon Display

Icon Display
# List with icons
eza --icons

# Icons + detailed view
eza -l --icons

# Icons + tree + Git
eza -T --icons --git
[folder] src
[folder] node_modules
[js] package.json
[ts] tsconfig.json
[md] README.md
[git] .gitignore

When Nerd Fonts are installed, actual icons will be displayed

Sorting and Filtering

Sorting and Filtering
# Sort by size
eza -l -s size

# Sort by modification time (newest first)
eza -l -s modified

# Sort by modification time (oldest first)
eza -l -s modified -r

# Sort by extension
eza -l -s extension

# Show directories first
eza -l --group-directories-first

# Show specific extension only (glob)
eza *.ts

# Show directories only
eza -D

Extended Attributes and Details

Extended Attributes
# Display extended attributes
eza -l@

# Display inode number
eza -l --inode

# Display block count
eza -l --blocks

# Display with header
eza -l --header

# Display all information
eza -l --header --git --icons -@

Configuration and Customization

Shell Alias Configuration

Add the following to ~/.bashrc or ~/.zshrc.

~/.bashrc or ~/.zshrc
# ~/.bashrc or ~/.zshrc

# Replace ls with eza
alias ls='eza'

# Common combinations
alias ll='eza -l --icons --git'
alias la='eza -la --icons --git'
alias lt='eza -T --icons --git-ignore'
alias lt2='eza -T --icons --git-ignore -L 2'
alias lt3='eza -T --icons --git-ignore -L 3'

# Show directories first
alias lsd='eza -l --icons --git --group-directories-first'

# Detailed list display
alias lll='eza -la --icons --git --header --group-directories-first'

LS_COLORS and EZA_COLORS

Customize colors with environment variables.

Color Settings
# Customize colors with EZA_COLORS
export EZA_COLORS="di=1;34:ln=36:so=32:pi=33:ex=1;32:bd=34;46:cd=34;43"

# You can also use LS_COLORS
# eza also references LS_COLORS

# Detailed color configuration example
export EZA_COLORS="\
da=38;5;245:\
uu=38;5;245:\
sn=38;5;28:\
sb=38;5;28:\
ur=38;5;214:\
uw=38;5;196:\
ux=38;5;46:\
gr=38;5;214:\
gw=38;5;196:\
gx=38;5;46:\
tr=38;5;214:\
tw=38;5;196:\
tx=38;5;46"

# Git status colors
export EZA_COLORS="$EZA_COLORS:\
ga=38;5;46:\
gm=38;5;214:\
gd=38;5;196:\
gv=38;5;33:\
gt=38;5;63"

Nerd Fonts Setup

Nerd Fonts are required for icon display.

Nerd Fonts Installation
# Install with Homebrew (macOS)
brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font
brew install --cask font-fira-code-nerd-font
brew install --cask font-jetbrains-mono-nerd-font

# Or download from Nerd Fonts official site
# https://www.nerdfonts.com/

# Select the installed Nerd Font
# in your terminal emulator settings

Icon Theme Customization

Icon Configuration
# Adjust spacing between icons and filenames with EZA_ICON_SPACING
export EZA_ICON_SPACING=2

# Switch icon type (--icons=auto, always, never)
alias ls='eza --icons=auto'

Comparison with ls

Featurelseza
Color Output--color optionColored by default
Icon Display-Nerd Fonts support
Git Integration-Per-file status display
Tree ViewNeeds separate treeBuilt-in with -T
Date FormatFixed formatRelative time also available
Extended Attributesls -l@More readable display
SpeedFastFast (Rust-based)
Header Display-Column descriptions with --header

Date/Time Formats

Various Time Display Formats

Date/Time Formats
# Default (date and time)
eza -l

# Display relative time (e.g., "2 hours ago")
eza -l --time-style=relative

# ISO format
eza -l --time-style=iso

# Long format (year month day hour minute second)
eza -l --time-style=long-iso

# Full timestamp
eza -l --time-style=full-iso

# Custom format
eza -l --time-style='+%Y-%m-%d %H:%M'

Tips

  • eza is a fork of exa. Since exa stopped being maintained, eza is actively developed as its successor
  • Nerd Fonts are required for icon display. Change your terminal font settings to a Nerd Font
  • Using --git-ignore excludes many files like node_modules, making tree view more readable
  • Using --group-directories-first shows directories first, making it easier to distinguish files from directories
  • Colors and icons are automatically disabled for pipes and redirects, so it's safe to use in scripts
  • Even with large directories, it runs fast because it's written in Rust
  • You can see all options with eza --help. Options are designed with ls compatibility in mind
Written by Dai AokiPublished: 2026-01-20

Related Articles

Explore More