Back to Linux guides

A Look into eza, the Modern ls Replacement

Stanley Ulili
Updated on December 15, 2025

If you spend any significant time in the terminal, you've probably used the ls command thousands of times. It's reliable and universal, but it hasn't evolved much in decades. You're left staring at monochromatic text, manually running git status to check file changes, and squinting to distinguish directories from executables. What if your file listings could instantly show you Git status, use colors to highlight important information, and display intuitive icons for each file type?

This is where eza comes in. Written in Rust, eza is a modern replacement for ls that brings speed, visual clarity, and contextual information directly to your terminal. It's not just about aesthetics—it's about embedding the information you actually need into every file listing, saving you time and mental energy.

In this tutorial, you'll learn how to install and configure eza, then master its five most powerful features: superior Git integration, advanced color theming, intelligent information filtering, flexible sorting options, and rich icon support. By the end, you'll have transformed your terminal file navigation from a mundane task into an efficient, informative experience.

Prerequisites

Before you begin, you'll need:

  • A Unix-like operating system (macOS, Linux, or WSL on Windows)
  • Basic familiarity with command-line navigation and running commands
  • Administrator access to install packages on your system
  • A terminal emulator (Terminal.app on macOS, or your preferred Linux terminal)
  • Optional: A Nerd Font installed for icon support (covered later in the tutorial)

What Is eza and Why Should You Use It?

The ls command has been a fundamental part of Unix systems since the beginning. Its purpose is simple: list directory contents. While it offers various flags for detailed views (-l), different sorting (-t), or showing hidden files (-a), the output remains largely unchanged from decades ago. You see plain, monochromatic text that requires significant cognitive effort to parse. When you need to know if a file has been modified, whether it's tracked by Git, or what type of file you're looking at, ls offers no help.

eza reimagines what a file listing command should be in a modern development environment. It started as a fork of another ls replacement called exa, which had stalled in development. The community recognized its value and Christina, a new maintainer, forked the project. Eventually it moved to the eza-community organization on GitHub to ensure long-term maintenance and active development.

The original exa repository

The tool brings several key advantages to your workflow. Built with Rust, eza delivers exceptional performance and memory safety while often outperforming similar tools. It colors files and metadata by default based on file type, permissions, and size, making the output instantly scannable. Perhaps most importantly for developers, it queries the Git index directly and displays the status of every file—whether new, modified, staged, or ignored—right alongside the filename.

You also get a built-in tree view that visualizes your project structure without needing a separate tree command. When you install a Nerd Font, eza displays beautiful icons next to files and directories for immediate visual identification. Every aspect of the tool is customizable, from color schemes to the specific information displayed, allowing you to craft views that perfectly match your workflow.

Installing eza on Your System

The installation process varies depending on your operating system, but eza is available through most major package managers.

Installing on macOS

If you're using macOS, Homebrew provides the simplest installation method:

 
brew install eza

Installing on Linux

On Ubuntu and Debian-based distributions, you can install eza through apt:

 
sudo apt install eza

For other Linux distributions, consult the official eza installation documentation for distribution-specific instructions.

Running Your First eza Commands

Once you've installed eza, you can start using it immediately to see how it compares to traditional ls. Let's run through some basic commands to experience the difference.

First, try a simple listing by running eza in any directory. You'll immediately notice the output uses multiple columns and applies intelligent color-coding by default. Compare this to what you see when you run the standard ls command—the difference in readability is striking.

Now try a detailed listing to see file metadata. Run eza -l and compare it to ls -l. The eza version presents a beautifully aligned and colored output that makes permissions, file sizes, and modification dates much easier to parse. The colors aren't just decorative—they carry meaning, helping you distinguish between different types of information at a glance.

Configuring Shell Aliases for Daily Use

Typing eza instead of ls creates friction in your workflow. The most effective way to integrate eza into your daily routine is through shell aliases. These tell your terminal to run eza with your preferred options whenever you type familiar commands like ls.

You'll need to add these aliases to your shell's configuration file. For Bash users, this is typically ~/.bashrc. For Zsh users, it's ~/.zshrc. For Fish shell users, you'll use ~/.config/fish/config.fish.

Here's a comprehensive set of aliases to get you started:

~/.zshrc
# Replace ls with eza
alias ls='eza'

# Long format with headers and icons
alias ll='eza -l --header --icons'

# Long format including hidden files
alias la='eza -la --header --icons'

# Tree view shortcut
alias tree='eza --tree'

After adding these aliases, restart your terminal or source the configuration file to apply the changes:

 
source ~/.zshrc

Now when you type ls, you're actually running eza with all its enhancements. You can still access the original ls command by typing /bin/ls if needed.

Understanding eza's Git Integration

If you work with Git repositories, you're constantly checking file status. You run git status to see what's changed, what's staged, and what's new. eza brings this information directly into your file listings, eliminating the context switching between commands.

eza Git integration output

Enabling Git Status Display

To see Git status information, add the --git flag to your command:

 
eza -l --git

This adds a dedicated column to the output, typically positioned between the permissions and the file size. The column displays a two-character status indicator for each file. The first character represents the status in your Git staging area (the index), while the second character shows the status in your working directory.

The status indicators you'll see include N for new files not yet tracked by Git, M for modified files with changes compared to the last commit, D for deleted files, R for renamed files, and I for ignored files matching patterns in your .gitignore. When you see a dash (-), it means the file is unchanged in that particular area.

For example, when you see -M in the status column, the file has been modified in your working directory but hasn't been staged yet. If you see M-, the file has been modified and staged for the next commit. This immediate visual feedback helps you understand your repository state without running additional commands.

Combining Git Integration with Tree Views

The real power emerges when you combine --git with other eza features. You can see the Git status of every file in a nested directory structure by combining --git with --tree:

eza tree view with Git status

 
eza --tree --git --level=2

This displays a tree view two levels deep, with Git status indicators for every file and directory shown. You get a complete picture of your project structure and version control state in a single command.

When you want a cleaner view that excludes files listed in your .gitignore, use the --git-ignore flag. This is particularly useful when you want to focus only on tracked files without the noise of build artifacts or dependencies.

For managing multiple projects, the --git-repos flag becomes invaluable. When you run this in a directory containing several Git repositories, eza lists each repository and reports its status, including the current branch and whether the repository has uncommitted changes. This gives you a quick overview of all your projects at once.

Customizing Colors and Themes

One of eza's most noticeable improvements is its intelligent use of color. The tool goes far beyond simply adding a splash of color to your terminal—it provides a sophisticated theming system that conveys meaningful information through visual design.

Using Color Scales for Context

The --color-scale feature applies a color gradient to file sizes and modification dates, making it trivial to spot outliers at a glance:

eza color scale output

 
eza -l --color-scale=all

When you run this command, smaller files appear in cool blue tones while larger files transition through yellow, orange, and red. This immediately draws your attention to potentially problematic large files. Similarly, older files fade to a muted gray while recently modified files appear bright and prominent, helping you instantly identify what's been worked on recently.

Installing Community Themes

If the default color scheme doesn't match your preferences, eza offers a comprehensive theming system. The eza-community organization maintains a dedicated repository of themes that you can browse and install.

eza themes repository

Installing a theme requires just a few steps. First, create a configuration directory for eza:

 
mkdir -p ~/.config/eza

Next, browse the eza-themes repository to find a theme you like. Download the .yml file for your chosen theme and save it in your configuration directory as theme.yml. The tool automatically detects and applies this theme file for all subsequent commands.

Creating Custom Themes

For complete control over your terminal's appearance, you can create your own theme.yml file from scratch. The eza documentation provides a comprehensive list of theme options you can customize. You can control the colors for normal files, directories, executables, symlinks, and more. You can customize permission colors individually, controlling how user read permissions, group write permissions, and other attributes appear. You can even customize how Git status indicators are colored.

This level of customization allows you to tailor the visual language of your terminal to your exact preferences, whether you prefer subtle pastels, high-contrast colors, or anything in between.

Filtering and Suppressing Information

While detailed output provides valuable context, sometimes you need a cleaner, more focused view. eza offers several flags to suppress columns and filter results, letting you create exactly the view you need for each situation.

When you're working on a personal project and don't care about user ownership or permissions, you can hide those columns entirely:

 
eza -l --no-user --no-permissions

This gives you a much cleaner output focused on what matters most: file size, modification date, and name. You're not distracted by information that isn't relevant to your current task.

Several other filtering options help you declutter your view. The --group-directories-first flag lists all directories before any files, making it easier to understand your project structure at a glance. When you only want to see directories and ignore files completely, use --only-dirs.

The --ignore-glob flag provides powerful pattern-based filtering for temporarily hiding files. For example, if you want to hide all log files and the node_modules directory while exploring a project, you can run:

 
eza -l --ignore-glob="*.log|node_modules"

This pattern matching gives you fine-grained control over what appears in your listings without modifying any .gitignore files or other persistent configurations.

Sorting Your File Listings Intelligently

eza takes a different approach to sorting than traditional ls, providing more explicit and powerful control over how your files are ordered. Where ls combines multiple options into cryptic flag combinations, eza uses a dedicated --sort flag that makes your intentions clear.

The classic ls -lt command, which sorts files by modification time with the newest first, becomes:

 
eza -l --sort=time

If you want the reverse order with the newest files at the bottom (equivalent to ls -ltr), you need to add the --reverse flag:

 
eza -l --sort=time --reverse

Because this reverse time sorting is so common, eza provides a special built-in sort key specifically for this purpose:

 
eza -l --sort=oldest

The sorting capabilities extend well beyond time-based ordering. You can sort by name for case-sensitive alphabetical order, or Name for case-insensitive sorting. The size option sorts by file size with the largest files first. You can sort by extension to group files of the same type together, or by created to order by creation timestamp rather than modification time. The inode option sorts by the file's inode number, which can be useful for certain system administration tasks. Finally, the type option intelligently sorts by file type, typically placing directories first.

This explicit sorting syntax makes your commands self-documenting. When you or a colleague reads eza -l --sort=size --reverse, you immediately understand that the output shows files sorted by size with the smallest first.

Adding Visual Flair with Icons

Perhaps the most aesthetically pleasing feature of eza is its ability to display icons next to files and directories. This isn't just about making your terminal look pretty—icons provide instant visual cues about file types, making it dramatically faster to find what you're looking for in a crowded directory.

eza with icons enabled

Installing a Nerd Font

Before you can use icons, you need a Nerd Font installed on your system. Nerd Fonts are regular programming fonts that have been patched to include thousands of additional glyphs and symbols. Visit the Nerd Fonts website to browse and download a patched version of your favorite font.

After downloading, install the font on your system and configure your terminal emulator to use it. The exact installation process varies by operating system, but on macOS you can simply double-click the font file to install it. On Linux, you typically copy the font files to ~/.local/share/fonts/ and run fc-cache -fv to refresh your font cache.

Enabling Icon Display

Once you have a Nerd Font configured in your terminal, enabling icons is straightforward:

 
eza -l --icons

You'll immediately see distinctive icons appear next to your files and directories. Folders display a folder icon, JavaScript files show the JavaScript logo, HTML files display the HTML5 icon, Markdown files get their own icon, and so on. This visual shorthand makes it incredibly fast to find the exact file you're looking for in a directory with dozens or hundreds of files.

By default, icons are disabled when you're piping or redirecting output to prevent the special characters from interfering with other tools. If you need to force icon display even in pipes, use --icons=always:

 
eza --icons=always | less -R

The -R flag to less tells it to interpret color codes, ensuring your icons and colors display correctly even in the pager.

Modern terminal emulators support a feature that eza takes full advantage of: clickable hyperlinks. When you enable this feature, eza wraps each file and directory name in special escape sequences that your terminal interprets as links.

This feature requires a terminal emulator that supports hyperlinks. iTerm2, WezTerm, and many modern terminals include this support. To enable clickable links, add the --hyperlink flag:

 
eza -l --hyperlink

Now you can Cmd-click (on macOS) or Ctrl-click (on Linux and Windows) a file name to open it in its default application. Click a directory name and it opens in your file manager. This small quality-of-life feature further bridges the gap between the command line and your graphical environment, letting you seamlessly move between the two when needed.

Final Thoughts

You’ve seen what eza can do, from Git-aware listings and smart sorting to colors and icons that make files easier to scan. It is not just a nicer ls. It puts useful context right in the output, so you spend less time guessing and more time moving.

Start simple with alias ls='eza', then add flags as your needs grow, like --color-scale for big files or Git status in a tree view. For more, try --extended, browse the official repo docs, and check out eza-themes for extra color schemes.

Install it and set one alias today. It is a small change that makes the command line feel better every day.

Got an article suggestion? Let us know
Licensed under CC-BY-NC-SA

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.