We ❤️ Open Source
A community education resource
Meet eza: The modern replacement for the ls command
How to explore your Linux filesystem with enhanced colorization, Git integration, and tree views.
The ls command works fine, but what if you want colorized output, Git integration, and a tree view all in one tool? In this video from Learn Linux TV, you’ll learn how eza modernizes directory listings with features the standard ls command simply doesn’t have.
Jay introduces eza, a modern replacement for ls that serves the same purpose (listing files in directories) but with additional features. The most obvious difference is enhanced colorization and optional headers that make output more readable. Running eza -lh produces a long listing with human-readable file sizes and a clean header row explaining each column.
Installation is straightforward on most distributions. Debian users can run sudo apt install eza, and the official repository site maintains a compatibility table showing which distributions include the package. Once installed, many familiar ls options work the same way, though eza isn’t a complete drop-in replacement.
Jay demonstrates useful options beyond basic listings. Using --sort=size sorts files by size instead of alphabetically. The --group-directories-first option shows all directories at the top of the listing before files. The --tree option displays a directory tree view similar to the tree command but with better colorization and cleaner formatting.
For filtering, --only-files shows just files while --only-dirs shows only directories. The standout feature is --git integration, which displays Git repository status directly in directory listings. When Jay creates a test file in his repository and runs eza --git, the output shows an “N” next to the new uncommitted file, indicating its status without running separate Git commands.
Key takeaways
- Enhanced colorization makes output readable –
ezaprovides more prominent color coding thanlsby default, with headers that explain column meanings for beginners. - Git integration shows repository status inline – The
--gitflag displays commit status, pending changes, and new files directly in directory listings without separate commands. - Tree view beats the tree command – Using
--treeproduces cleaner directory trees with better colorization than the standalonetreecommand.
The eza command proves you don’t need to settle for basic ls output. Jay’s tutorial shows that modern replacements can deliver genuinely useful features while keeping the familiar workflow intact.
More from Learn Linux TV
- youtube.com/learnlinuxtv
- Linux tips | Linux how-to’s | Linux installation guides
- How to build automated Linux backups that don’t silently fail
- Why Linux experts are ditching Man pages for this simple tool
- 5 practical tips for learning Linux tools
The opinions expressed on this website are those of each author, not of the author's employer or All Things Open/We Love Open Source.