Why exa Is the Faster, Colorful Replacement for ls on Linux and macOS
This guide introduces exa, a Rust‑based, open‑source file‑listing tool that adds Git integration, colorized output, tree views, and parallel scanning to replace the classic ls command, and shows how to install and use it across major Linux distributions and macOS.
If you work on Linux or any Unix‑like operating system, you are familiar with the ls command that lists files and directories. While ls has been around for decades, it lacks modern features such as built‑in Git status, colorful output, and tree‑style views.
What is exa?
Exa is a free, open‑source command‑line utility written in Rust that serves as a modern replacement for ls. It is lightweight, fast, and provides richer metadata, color‑coded file types, and optional Git information.
Key Features
Parallel directory scanning for rapid output, even with hundreds of files.
Colorized file type and metadata display based on extensions.
Built‑in tree view ( --tree or -T) without needing external tools.
Git integration: --git adds a column showing staged/unstaged status.
Human‑readable file sizes by default.
Option to disable colors with --color=never.
Installation
Exa is distributed as a single binary, so you only need to place it in a directory listed in your $PATH (e.g., /usr/bin/). The easiest way is to use your system’s package manager:
Debian/Ubuntu (20.10+): sudo apt install exa Arch Linux: pacman -S exa Fedora: dnf install exa Gentoo: emerge sys-apps/exa openSUSE: zypper install exa macOS (Homebrew): brew install exa Alternatively, you can compile from source by following the instructions on the project's repository.
Basic Usage
List files with metadata: exa -l Add a header row to explain each column: exa -lh Show the contents of a specific directory: exa /home/user Recursively list all files in subdirectories: exa -R Display a tree‑style view of the directory hierarchy: exa -T Limit the depth of the tree view (e.g., two levels): exa -T -L 2 Disable colored output if you prefer plain text:
exa --long --color=neverGit Integration
When run inside a Git repository, adding --git inserts a column that shows M for modified, A for added, etc., indicating the staging status of each file without invoking git status separately.
Further Reading
For a complete list of options and advanced usage, consult the official exa documentation linked in the project’s repository.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
