eza
Modern ls replacement with colors, icons, and Git status.
Official WebsiteFeatures
lsInstallation
brew install ezapacman -S ezacargo install ezaWhy 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
# 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 -laOutput Example
Colors and icons are displayed according to file type (when using Nerd Fonts)
Common Options
| Option | Description | Example |
|---|---|---|
-l | Detailed display (long format) | eza -l |
-a | Show hidden files | eza -a |
-T | Tree view | eza -T |
-L | Specify tree depth | eza -T -L 2 |
--icons | Display icons | eza --icons |
--git | Display Git status | eza -l --git |
--git-ignore | Exclude .gitignore files | eza --git-ignore |
-h | Human-readable file sizes | eza -lh |
-r | Sort in reverse order | eza -lr |
-s | Specify sort method | eza -s size |
-d | Display directory itself (not contents) | eza -ld */ |
--group-directories-first | Show directories first | eza --group-directories-first |
Practical Usage Examples
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-ignoreGit 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-reposGit status: N=new, M=modified, D=deleted
Icon Display
# List with icons
eza --icons
# Icons + detailed view
eza -l --icons
# Icons + tree + Git
eza -T --icons --gitWhen Nerd Fonts are installed, actual icons will be displayed
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 -DExtended Attributes and Details
# 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
# 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.
# 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.
# 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 settingsIcon Theme Customization
# 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
| Feature | ls | eza |
|---|---|---|
| Color Output | --color option | Colored by default |
| Icon Display | - | Nerd Fonts support |
| Git Integration | - | Per-file status display |
| Tree View | Needs separate tree | Built-in with -T |
| Date Format | Fixed format | Relative time also available |
| Extended Attributes | ls -l@ | More readable display |
| Speed | Fast | Fast (Rust-based) |
| Header Display | - | Column descriptions with --header |
Date/Time Formats
Various Time Display 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-ignoreexcludes many files like node_modules, making tree view more readable - •Using
--group-directories-firstshows 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