exa is a tiny, fast, and modern replacement for the ordinary ls command that comes pre-installed on all Unix and Linux operating systems. It is an enhanced file lister that ships with more advanced features and a more user-friendly version of ls.
It uses colors to determine the information of file types and metadata. It is also aware of symlinks, extended attributes, viewing git status, and recursing into directories with a tree view.
The command exa is used by command-line users, system administrators, and programmers hundreds of times daily, as well as being helpful when writing automated scripts.
Installing exa on Linux Systems
exa is a self-contained binary package, which is available for many modern Linux distributions and can be installed using common package managers.
$ sudo apt install exa [On Ubuntu & Debian] $ sudo dnf install exa [On Fedora, CentOS & RHEL] $ sudo zypper install exa [On openSUSE] $ sudo emerge sys-apps/exa [On Gentoo] $ sudo pacman -S exa [On Arch & Manjaro]
If you are using an earlier version of Linux distribution, you will have to use the manual installation procedure.
Using exa on Linux Systems
As mentioned earlier, exa is an improvement version of the classic ls command and can be executed by specifying your options, and input file names, then exa queries the filesystem and displays the names and information of metadata about the files it comes across.
$ exa [OPTIONS] [FILES]
exa doesn’t bother whether files or options come first in the list, though it’s common practice to put the options before the files.
Listing files is a cakewalk, you just need to mention the filename with an argument with some options for how to print files, and exa will list them.
$ exe $ exa -l $ exa -l Linux_For_Beginners.pdf
If you specify a directory name to exa, it will list the contents of that directory rather than listing the directory itself.
$ exa Documents
A link is a file that points to another file as its “actual” contents in Linux. When you run exa, it will print a link’s target path next to its filename as shown.
$ exa -l /etc/localtime /etc/resolv.conf
Finally, it’s achievable for exa to recurse into a directory and display the contents of every sub-directory underneath it.
$ exa -l --recurse /home
For a complete reference on what exa can do, visit the documentation pages here.