eza: How to Use eza with Icons

Updated

Learn how to use file icons in eza, install a Nerd Font, and add permanent aliases.

eza: How to Use eza with Icons

Before we start, make sure you have eza installed (brew install eza) and a patched Nerd Font active in your terminal.

Basic Icon Commands

Use the --icons flag to show file and folder icons next to names:

eza --icons

By default, eza --icons (the same as --icons=auto) shows icons only in an interactive terminal and omits them when piped. Use --icons=always to keep icons when piping to tools like bat or less, or --icons=never to turn them off explicitly.

Install a Nerd Font

If icons show up as empty boxes or question marks, install a Nerd Font with Homebrew and select it in your terminal emulator's profile settings:

brew install --cask font-jetbrains-mono-nerd-font

Save Icons in Your Aliases

To enable icons automatically, add these aliases to ~/.zshrc or ~/.bashrc:

alias ls="eza --icons --group-directories-first"
alias ll="eza -lh --icons --git --group-directories-first"
alias lt="eza --tree --level=2 --icons"
undefined

Don't forget to run source ~/.zshrc (or open a new terminal tab) so your updated aliases take effect right away.