Skip to content

Replacing ls with exa

Created: Feb 10, 2022 – Last Updated: Feb 10, 2022

Tags: CLI

Digital Garden

Everyday I’m using ls which is a file-listing command that ships with Unix and Linux operating systems. But some time ago I actually replaced ls with exa (opens in a new tab). Never heard of it? Now you will!

It describes itself with:

exa is an improved file lister with more features and better defaults. It uses colours to distinguish file types and metadata. It knows about symlinks, extended attributes, and Git. And it’s small, fast, and just one single binary.

And I can confirm: It’s really the better & modern replacement for ls. One thing I particularly liked is the git integration.

You can follow the installation guide (opens in a new tab) on their website to get started. I personally used MacPorts (opens in a new tab) (which is not listed there) with sudo port install exa.

I’m using these ZSH aliases with exa now:

## exa
alias ls="exa" # ls
alias ll='exa -lbF --git' # list, size, type, git
alias llm='exa -lbGd --git --sort=modified' # long list, modified date sort
alias la='exa -lbhHigUmuSa --time-style=long-iso --git --color-scale' # all list
alias lx='exa -lbhHigUmuSa@ --time-style=long-iso --git --color-scale' # all + extended list
alias lS='exa -1' # one column, just names
alias lt='exa --tree --level=2' # tree

Want to learn more? Browse my Digital Garden