TechEarl

exa and eza: A Modern ls Replacement

exa was the modern ls replacement with color, a git column, and a tree view in one binary; it is now unmaintained and eza is the drop-in fork to install instead. The flags, the eza migration, when plain ls is still the right call, and bat, the matching cat replacement.

Ishan KarunaratnePublished ⏱️ 16 min readUpdated
Share thisCopied
exa is unmaintained; install eza, the maintained ls replacement. Flags, git column, tree view, and migration, plus bat, the cat replacement with highlighting.

exa was a modern ls replacement: one Rust binary that gave you colorized output, a git status column, a tree view, and human-readable sizes without a single alias. The thing to know in 2026 is that exa is no longer maintained, and the drop-in replacement is eza, a community fork that picks up where it stopped. So the practical answer is: install eza, not exa.

bash
# Debian 13+ / Ubuntu 24.04+ (older releases: use the deb.gierens.de repo)
sudo apt install eza

# Fedora 41 and older
sudo dnf install eza
# Fedora 42+ (dropped from the official repos; use the COPR or a release binary)
sudo dnf copr enable alternateved/eza && sudo dnf install eza

# Arch
sudo pacman -S eza

# macOS
brew install eza

eza keeps the same command surface as exa, so everything below works against either binary; just substitute the name. If you already have an exa install, your muscle memory and your aliases port over unchanged. The rest of this page is the flag reference, the migration, and the honest list of when plain ls is still the better tool, followed by bat, the same kind of modern Rust rewrite for cat.

Why exa, and why eza now

exa shipped sensible defaults that ls never had: a colored, column-aligned grid that distinguishes file types at a glance, sizes in K/M/G without needing -h, and a git-aware long view. It was popular enough to land in most distro repos.

Then development stalled. exa's last release was v0.10.1 in April 2021, and the project's own README now reads "exa is unmaintained, use the fork eza instead." (The repo is not formally archived only because the one person with rights to archive it is unreachable.) Open issues and pull requests sit unmerged, and some distributions have since dropped the package. eza is the maintained fork that took over: same author-facing behavior, same flags, ongoing bug fixes and new features (hyperlink support, better theming via a config file, more --git accuracy). If you are choosing today, choose eza. If you inherited an exa install, it still runs, but it will not get fixes.

I will write eza from here on. Replace it with exa mentally if you are on an older box that still has it.

The long view: eza -l

The command you will use most:

bash
eza -l

That prints the long listing: permissions, size, modified date, and name, one file per line, colorized by type. It is the ls -l equivalent, but the size column is human-readable by default and the colors actually mean something.

Stack the common flags the way you would with ls:

bash
eza -la          # long view, including dotfiles
eza -la --git    # ...plus a git status column
eza -lah         # the -h here shows file headers, not "human sizes"

One gotcha for ls muscle memory: in eza, -h is not "human-readable sizes" (those are already on); -h means --header, which prints a column header row. Sizes are human by default, so you rarely need to think about it.

The git status column: --git

bash
eza -l --git

This adds a two-character column showing each file's git status relative to the index and working tree: N for new/untracked, M for modified, staged versus unstaged shown in the two positions. It only does anything inside a git repository; outside one, the column is blank. It is the feature that made exa worth installing, and eza keeps it.

A worked example inside a repo with one tracked edit and one new file:

code
$ eza -l --git
-M .rw-r--r--  1.2k techearl  5 Apr 10:14 readme.md
-N .rw-r--r--   840 techearl  5 Apr 10:15 notes.txt
-- .rw-r--r--  3.1k techearl  2 Apr 09:02 config.toml

The git column is the leftmost one, two characters wide: the first position is the staged state, the second is the unstaged state. readme.md is modified in the working tree (-M), notes.txt is new and untracked (-N), config.toml is clean (--). No git status needed for a quick glance.

The tree view: eza -T

bash
eza -T

-T (or --tree) prints the directory as a tree, the same shape the standalone tree command gives you, but with eza's colors, git awareness, and the ability to bolt on a long view. Limit the depth so you do not dump an entire node_modules:

bash
eza -T --level=2          # two levels deep
eza -lT --level=2 --git   # tree + long columns + git status
eza -T --git-ignore       # tree, but skip files in .gitignore

--git-ignore is the one I reach for most in a project root: it respects .gitignore, so the tree shows the files you actually care about instead of build output.

Icons and grouping

bash
eza --icons

--icons prefixes each entry with a Nerd Font glyph for its file type. It only renders correctly if your terminal font is a patched Nerd Font; without one you get tofu boxes (the empty rectangles a font shows for a glyph it has no character for). Worth setting up once, then it is on for good via an alias.

If the icons come out as boxes or question marks, the fix is always the font, not eza: install a Nerd Font (for example JetBrainsMono Nerd Font) and point your terminal at it. On newer eza, --icons also takes an argument: --icons=always forces them on even when output is piped, and --icons=never turns them off without editing your alias.

A couple more flags that earn their keep:

bash
eza -l --group-directories-first    # directories sorted to the top
eza -l --sort=modified               # oldest first; add --reverse for newest first
eza -l --no-permissions --no-user    # trim columns you do not need

eza vs ls: the flag map

If you know ls, this is the translation table. Most ls short flags carry over, with a few that mean something different.

Tasklseza
Long listingls -leza -l
Include dotfilesls -laeza -la
Human-readable sizesls -lheza -l (default)
Sort by modified timels -lteza -l --sort=modified
Reverse sortls -lreza -l --reverse
Recursivels -Reza -R
Tree view(tree)eza -T
Git status column(none)eza -l --git
Column header row(none)eza -lh / eza -l --header

The standout difference is -h. On ls, -h is human-readable sizes; on eza, sizes are human by default and -h is --header. The other trap is that eza does not implement every obscure ls flag, so a script that leans on ls -1 --quoting-style=... will not port verbatim. For interactive use the map above covers almost everything.

Make it your default with an alias

Once you trust it, alias ls to eza in your shell rc so the new behavior is the default:

bash
# ~/.bashrc or ~/.zshrc
alias ls='eza --group-directories-first'
alias ll='eza -la --git --group-directories-first'
alias lt='eza -T --level=2 --git-ignore'

Keep the real ls reachable: command ls or \ls bypasses the alias when a script or a habit needs the original. That matters because aliasing ls to a tool that may not be installed everywhere is exactly how a copy-pasted shell snippet breaks on a server that has never heard of eza.

When plain ls is still the right call

eza is a better interactive ls. It is not a universal replacement, and a few situations call for the original:

  • Scripts and portability. ls is in POSIX and present on every Unix box, including minimal Alpine containers and stripped-down servers. eza is an extra install. Never alias ls to eza in a way that leaks into scripts; parse with find, stat, or globbing rather than scraping eza output anyway.
  • Machine-readable output. If you are piping into awk or cut, the colorized, human-sized eza output is harder to parse than ls -l --time-style=... or, better, stat and find -printf. Do not parse ls either, but if you must, ls is the more stable contract.
  • A box where you cannot install anything. On a locked-down production host, ls is what you have. Learn ls -lhtr and move on.
  • Disk usage, not listings. eza lists files; for "what is eating my disk" reach for a real disk tool. The duf disk usage df replacement covers the friendlier df/du alternatives.

For day-to-day work in a terminal you control, eza wins on legibility. For anything that has to run somewhere else, write it against ls or the proper tool.

bat: a modern cat replacement

bat does for cat what eza does for ls. bat file.py prints the file the way cat does, but with syntax highlighting, line numbers, and a Git change gutter down the left edge, and it pipes through a pager automatically when the output is longer than the screen. It is a single Rust binary by Sharkdp, the same author as fd and hyperfine.

The thing to know up front: bat is built for a human looking at a terminal, not for a pipe. When you redirect its output or pipe it into another command, it detects that and falls back to plain, undecorated text, exactly like cat. So bat file | grep foo works the way you expect.

Install bat (batcat on Debian and Ubuntu)

bash
# Debian / Ubuntu (binary is "batcat", not "bat")
sudo apt install bat

# Fedora
sudo dnf install bat

# Arch
sudo pacman -S bat

# macOS (Homebrew)
brew install bat

On Debian and Ubuntu the executable is installed as batcat, because the name bat already belongs to an unrelated package (the Bacula Administration Tool). Everywhere else the binary is bat. To type bat on Debian or Ubuntu, add a symlink (or alias bat='batcat'):

bash
mkdir -p ~/.local/bin
ln -s /usr/bin/batcat ~/.local/bin/bat

Check the version once it is in:

bash
bat --version
text
bat 0.26.1

On Windows, install it with winget install sharkdp.bat, scoop install bat, or choco install bat; it runs in PowerShell, Windows Terminal, and Git Bash with the same flags.

Read a file with bat

bash
bat src/main.rs
bat Cargo.toml src/main.rs

The first prints main.rs with Rust highlighting, a line-number column, a filename header, and (inside a Git repo) + / ~ gutter markers for lines added or changed since the last commit. If the file is longer than your terminal, bat opens it in less and drops you back at the prompt when you quit. Several files work the same as cat, each with its own header so you can tell where one ends and the next begins.

Alias cat to bat safely

bash
# In ~/.bashrc or ~/.zshrc
alias cat='bat --paging=never'

--paging=never is the important part. Plain cat never pages; it dumps the file and returns. Alias cat to bare bat and cat shortfile suddenly opens a pager for files that used to just print, which breaks muscle memory. With --paging=never the alias prints and returns, and you still get paging when you type bat directly.

Scripts are safe: aliases are not expanded in non-interactive shells, and bat also detects when its output is not a terminal and strips all decoration, so a script calling cat file gets clean bytes, not escape codes. The same rule as the ls alias above applies: keep the real cat reachable (command cat) and never depend on bat on a server that does not have it. On Windows the alias collides with PowerShell, where cat is already an alias for Get-Content; use Set-Alias cat bat in your PowerShell profile, or just call bat by name.

The bat flags that matter

FlagWhat it does
-p, --plainNo line numbers, no Git gutter, no header. Pass it twice (-pp) to also disable paging. The closest thing to raw cat.
--style=<components>Pick exactly which decorations show. Comma-separated: numbers, changes, header, grid, full, plain.
--paging=<when>auto (default), never, or always. never is what the cat alias wants.
-l, --language=<lang>Force the syntax language when bat guesses wrong, e.g. bat -l json config for a JSON file with no extension.
--theme=<name>Pick the highlight theme. bat --list-themes shows what is installed.
--color=<when>auto, always, or never. Use always when you want color to survive a pipe.
-A, --show-allRender non-printable characters (tabs, carriage returns, the lot), like cat -A.

Line numbers only, no pager, color forced on so it survives being piped into less -R:

bash
bat --style=numbers --paging=never --color=always app.log | less -R

And the minimal "bytes with highlighting" form for command substitutions or anywhere you want predictable output (add --color=never to drop color too):

bash
bat -pp src/main.rs

bat for git diffs and as a man pager

The Git change gutter is on by default inside a repository (it compares against the Git index); --style=changes shows just that gutter, and --style=plain hides it. For a real unified diff with highlighting, pipe git diff through bat:

bash
bat --style=changes src/main.rs
git diff | bat -l diff

To get colorized man pages, set bat as the man pager in your shell rc:

bash
export MANPAGER="sh -c 'col -bx | bat -l man -p'"

col -bx strips the backspace-based bolding that man emits, and bat -l man -p renders it as a clean, colorized page.

bat vs cat: when to use which

catbat
HighlightingNoneSyntax-aware, themeable
Line numbers-n flag, plainOn by default, in a side column
Git changesNoneGutter markers in a repo
PagingNeverAuto (off in a pipe, off with --paging=never)
In a pipeRaw bytesRaw bytes (auto-detects, strips decoration)
AvailabilityEvery Unix box, no installNeeds installing
StartupInstantSlightly slower (loads syntax sets)

bat is a reading tool; cat is a plumbing tool. Use cat to concatenate files (cat a b c > out, which is what the name is short for), to feed bytes into another program, or on a minimal server where you cannot install anything. Use bat when a human is reading a config file, source, or a log and wants to see the structure. It is marginally slower to first byte because it loads syntax definitions on startup; you will never notice that reading one file, only in a tight loop over thousands of files, which is exactly where cat or a stream tool belongs anyway. It is the same split as eza versus ls.

See also

FAQ

eza is a maintained community fork of exa. The original exa project went unmaintained after its last release in April 2021 and stopped receiving fixes, so eza took over with the same command-line surface plus ongoing bug fixes and new features. The flags are the same, so anything you knew in exa works in eza. On a new machine, install eza; only keep exa if you already have it on an older system.

No. exa has been unmaintained since its last release in April 2021 and the project's README now points people to eza. It still runs if it is already installed, but it will not get bug fixes or new features. The actively maintained replacement is eza, which most distributions still package (Fedora dropped it from the official repos in Fedora 42). See the eza GitHub repository for releases.

Add --git to a long listing: eza -l --git. It prints a two-character column with each file status relative to git: N for new/untracked, M for modified, with staged and unstaged shown in the two positions. The column only appears inside a git repository; elsewhere it is blank.

It does have -h, but it means something different. In eza, sizes are already human-readable by default, so -h is --header, which prints a column header row. You do not need a flag to get K/M/G sizes; they are on out of the box. This trips up people coming straight from ls -lh.

Almost always a font problem, not an eza problem. The --icons glyphs come from the Nerd Font set, so your terminal has to be using a patched Nerd Font (such as JetBrainsMono Nerd Font or FiraCode Nerd Font); without one you get tofu boxes or question marks. Install a Nerd Font and select it in your terminal settings. If the icons are missing entirely rather than rendering as boxes, check that you are passing --icons (or --icons=always) and that output is going to a real terminal: the default --icons=auto suppresses them when output is piped or redirected.

For interactive use, yes, it is a nice default: alias ls='eza --group-directories-first' in your shell rc. Keep the real binary reachable with command ls or \ls for when you need it. Do not let the alias leak into scripts, and never rely on it on a server where eza is not installed: plain ls is the portable, always-present tool.

bat is a cat clone written in Rust that adds syntax highlighting, a line-number column, Git change markers, and automatic paging. Plain cat just dumps file bytes. When bat output is piped or redirected it strips all decoration and behaves like cat, so it is safe in pipelines.

The name bat already belongs to an unrelated Debian package (the Bacula Administration Tool), so the binary is installed as batcat. The tool is identical. Symlink it with ln -s /usr/bin/batcat ~/.local/bin/bat or add alias bat='batcat' to your shell rc.

Use alias cat='bat --paging=never'. The --paging=never part keeps it behaving like cat: it prints and returns instead of opening a pager. Scripts are unaffected because aliases are not expanded in non-interactive shells, and bat strips decoration when output is not a terminal.

Use -p (--plain) to drop line numbers, the Git gutter, and the header; pass it twice, -pp, to also disable paging. Add --color=never to strip color. bat -pp --color=never file is about as close to raw cat as bat gets.

Sources

Authoritative references this article was fact-checked against.

TagsexaezalsbatcatCLILinuxmacOSShell Scripting

Found this useful? Pass it on.

Copied

Ishan Karunaratne

Systems and Network Architect · Chief Technology Officer

Systems and network architect and Chief Technology Officer with more than two decades designing, building, and running production software, cloud and network architecture, Linux systems, and the bare metal underneath them, and lately working AI into the stack. A US Army veteran who served in Operation Iraqi Freedom. What I write here is drawn from the full arc of that work, across architecture, engineering, and operations, not any single job.

Keep reading

Related posts

Load WordPress secrets from a .env file with phpdotenv, keep it out of git and the web root, and harden wp-config.php with an annotated template.

Use a .env File for WordPress Config and Secrets

Keep API keys, database credentials, and SMTP secrets out of wp-config.php and out of git by loading them from a .env file with vlucas/phpdotenv, load Composer packages from a must-use plugin, then harden the rest of wp-config.php with an annotated template: file editing off, forced HTTPS, salts, debug logging, and permissions.

How to fix the NODE_MODULE_VERSION mismatch error in Node.js by rebuilding native modules against the current ABI

Fix NODE_MODULE_VERSION Mismatch in Node.js

The NODE_MODULE_VERSION mismatch error means a native addon was compiled against a different Node ABI than the one now running it. Here is what the numbers mean, the one-line fix, and the Electron, Docker, and CI variants that catch people out.

When to embed vs reference in MongoDB: the 16 MB limit, $lookup joins, bucket and subset patterns, and storing money (Decimal128) and UUIDs (Binary subtype 4).

MongoDB Schema Design: Embedding vs Referencing

When to embed related data as subdocuments and when to reference it by _id in MongoDB. The 16 MB document limit, $lookup joins, the established schema-design patterns, and the field types that trip people up: money as Decimal128 or integer cents, and UUIDs as BSON Binary subtype 4.