Eza is a modern replacement for the traditional command-line program “ls
“, offers more features and optimization, and allows you to customize the output as per your preferences.
The distinguishing features that set it apart from “ls
” and other listing programs are hyperlink support, mount point information, SELinux context output, status of Git repo, support for “bright
” terminal colors, and many smaller bug fixes/changes.
If you’ve been following us for a while, then you might know that we’ve covered an article on the "g
” tool, which is also a modern and advanced replacement for the old “ls
” command. From my perspective, it offers more features and customization options with easier installation than Eza, so I suggest you try it if you’re looking for an “ls
” replacement.
However, you can also read this entire article to find out what Eza has to offer and whether you should make the switch.
Tutorial Details
Description | Eza |
Difficulty Level | Low |
Root or Sudo Privileges | No |
OS Compatibility | Ubuntu, Manjaro, Fedora, etc. |
Prerequisites | – |
Internet Required | Yes (for installation) |
How to Install Eza on Linux
The installation step of Eza varies based on the Linux distribution, so if you are using one of the Linux distributions from this list of supported systems, you can install it from your default package manager.
However, it’s available for installation via the default package manager on most Linux distributions, but if you’re using Debian, Ubuntu, or OpenSUSE systems, you’ll need to follow additional steps, or you can opt for the Homebrew and Cargo methods to easily install it on these systems.
Installing Eza on Debian and Ubuntu Distribution
If you’re running a Debian or Ubuntu-based distribution, you can manually add its repository and signing key, then install it using the default APT package manager.
First, start by updating your system repository information, and then proceed to install the GPG package:
$ sudo apt update
$ sudo apt install gpg
Then add the repository, signing key, and install it using the default package manager.
$ sudo mkdir -p /etc/apt/keyrings
$ wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg
$ echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo $ tee /etc/apt/sources.list.d/gierens.list
$ sudo chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list
$ sudo apt update && sudo apt install -y eza
Installing Eza on OpenSUSE
On an OpenSUSE system, you need to first add the openSUSE:Factory/eza repository and then install it using the distributions default Zypper package manager.
$ sudo zypper ar https://download.opensuse.org/tumbleweed/repo/oss/ factory-oss
$ sudo zypper in eza
Installing Eza on Fedora, Arch, Gentoo, Void Linux, and Tmux
If you’re using the supported systems, you can easily install it from the distributions default package manager.
$ sudo dnf install eza #For Fedora
$ sudo pacman -S eza #For Arch
$ emerge --ask sys-apps/eza #For Gentoo
$ sudo xbps-install eza #For Void Linux
$ pkg install eza #For Tmux
Installing Eza via Homebrew and Cargo
If you have Homebrew or Cargo installed and configured on your system, you can easily install and use it by running the following command:
$ brew install eza #For Homebrew
$ cargo install eza #For Cargo
How to Use Eza on Linux
After the installation is complete, the “eza
” command becomes accessible from the terminal, but executing it directly without any options will give you a plain output.
$ eza
Output:
To enhance your experience, you need to use it with different available options, and later, you can create an alias of your favorite Eza command syntax.
For the complete list of available options, you can use the “eza --help
” command, but it might be overwhelming for a beginner, so I’ve curated the list of commands that I find most useful in the following table.
Command | Description |
---|---|
eza -l | Display the entries with permissions, size, user, modified date of the file, and directory. |
eza -lh | Display the same output as the “eza -l ” command but with a column header. |
eza -la | Display all the files and directories, including the hidden ones. |
eza -lT | Recursively display the file and directory content in a tree like structure. |
eza --icons=always|auto|never | Display the entries with icons, but make sure to install Nerd fonts. |
eza --hyperlink | Display the entries with a clickable hyperlink. |
eza --absolute | Display the entries with an absolute (or full) path. |
eza -lD | Display only the entries of directories. |
eza -ld | Display only the entries of files. |
eza -lB | Display the file size in bytes. |
eza -l --total-size | Recursively display the size of files and files inside other directories. |
eza -lg | Display the files and directories group. |
eza -li | Display the files inode number. |
The following are commands with a pair of options that I find useful, but to dig deeper, you can check out the complete list from the help section and feel free to cross-use each available option.
Final Word
Honestly, I didn’t find this too interesting, and as of now, it doesn’t have much to offer to make me switch from traditional or other modern tools such as “g
“. But I’m interested in knowing your opinion. If you’re making the switch, let me know why in the comments.
Till then, peace!
Join The Conversation
Users are always welcome to leave comments about the articles, whether they are questions, comments, constructive criticism, old information, or notices of typos. Please keep in mind that all comments are moderated according to our comment policy.