How to Fix bash: eza: command not found in Minimal Linux Distributions

System administrators and command-line power users increasingly rely on eza (the modern, actively maintained successor to exa) to replace standard ls commands with coloured typography, Git status indicators, file permission breakdowns, and tree views. When attempting to invoke eza in minimal server images, Docker containers, or fresh cloud installations, the shell returns: bash: eza: command not found because minimal distributions do not package rust-based CLI utilities in default installations.

Install eza via Distribution Repositories

Depending on your active Linux distribution, install eza using official or community repositories:

Ubuntu and Debian

# Install official repository key and package
sudo apt-get update
sudo apt-get install -y gpg wget
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-get update
sudo apt-get install -y eza

Fedora and RHEL / Rocky

sudo dnf install -y eza

Alpine Linux

sudo apk update
sudo apk add eza

Arch Linux

sudo pacman -S eza

Configure Aliases in Shell Configuration

To establish eza as your default directory listing tool with sensible defaults:

  1. Open your ~/.bashrc or ~/.zshrc file:
    nano ~/.bashrc
  2. Add aliases for common listing flags:
    alias ls="eza --icons"
    alias ll="eza -lh --icons --git"
    alias la="eza -lah --icons --git"
    alias tree="eza --tree --icons"
  3. Save changes (Ctrl + O, then Ctrl + X) and run source ~/.bashrc.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.