Installing & Using Exa on Ubuntu 20.04
If you’ve spent hours scrolling through gigantic ls output that looks like a spreadsheet gone rogue, it’s time to meet exa, the modern, color‑rich replacement for ls. This article walks you through installing exa from Ubuntu’s repositories, making it your default file lister, and pulling out the flags that make your terminal feel less dusty.
Why Swap Out ls For Exa?
I once ran a script that dumped thousands of log files into /var/log and tried to inspect them with plain ls. The terminal froze for a full minute before rendering anything. Exa is engineered for speed; it streams output in parallel and only pulls the columns you ask for, so even huge directories stay snappy.
Installing Exa from Ubuntu’s Default Repos
sudo apt update && sudo apt install exa
Ubuntu 20.04 ships exa in the universe repository, so no third‑party PPAs are necessary. If you’re on a minimal install, make sure that repository is enabled (/etc/apt/sources.list.d/universe.list). After installation, verify it’s working:
exa --version # should print something like 0.10.1
Make Exa the Default ls (Optional but Handy)
If you want every ls command to be served by exa without changing your workflow, add an alias in your shell startup file:
echo "alias ls='exa --color=auto'" >> ~/.bashrc source ~/.bashrc # or reopen the terminal
Now type ls and you’ll get a colorful list with icons for directories, files, and even git status when inside a repo.
Basic Usage Tips
| Flag | What It Does | Why You’d Use It |
|---|---|---|
| -l or --long | Detailed listing (permissions, owner, size) | Replace ls -l with a cleaner view. |
| -a or --all | Include hidden files (. prefixed) | Same as ls -a. |
| -F or --icons | Show icons for file types | Quick visual identification. |
| --git | Append git status symbols (✓, ✗, etc.) | Great if you’re working in a repo. |
Example:
exa -alF --git
This mirrors the most common ls -laF combo but adds Git arrows and icons.
Advanced Flags Worth Trying
- --group-directories-first – puts all directories at the top of your list, so you don’t have to scroll past a wall of files.
- --sort=modified – sorts by last-modified time, handy when hunting for recently changed docs.
- --tree – renders a tree view instead of a flat list (think tree command).
- --color=always – forces color output even in scripts; useful if you pipe into other tools.
Common Pitfalls & Troubleshooting
1. Alias doesn’t work after reboot – remember to source the file or log out/in.
2. No icons appear – your terminal might not support UTF‑8 or the Nerd Fonts are missing. Install a patched font and set it as the default in your terminal settings.
3. Performance hiccups with very deep trees – exa --tree can become slow on deeply nested directories; use --depth=N to limit recursion.
Try It Out
Give exa a whirl in any directory, and if you’re inside a Git repo, watch the little checkmarks pop up. It’s light (under 10 MB) and fast, so your terminal will feel less like a relic from the early 2000s.