Listing the contents of a directory is a common task that Linux users carry out. The ls command is commonly used for this operation and it sure does a decent job in displaying all the files and sub-folders contained in a directory. With additional options, you can even display the file size, file permissions, and ownership among other file attributes.

Written in Rust programming language, Exa is a fast & improved file listing tool that enhances the output of the ls command. The tool provides the following features:

Exa Features

  • Colorized output: Exa intelligently recognizes different file types – whether regular files, directories, symlinks, etc – and assigns a color code to each file type.
  • Fast speed: With Exa, files are queried in parallel, thus yielding a performance that is at par with the ls command.
  • Tree tool builtin – Exa ships with the nifty tree command-line tool that displays a hierarchy of the directory’s content.
  • Git support – Exa can query files in a Git repository and provide each of the file’s Git status.

At the moment, Exa is only available for Linux and macOS systems. However, the developers have given their assurance that they will make it available for Windows in the not-so-far future.

How to install Exa in Linux

As earlier mentioned, Exa is written in Rust programming language. But thankfully, there is a precompiled version of the Exa command available, so we don’t have to compile it ourselves.

You can find the latest binary files on the exa installation page or GitHub.Currently, the latest version is Exa v0.10.0.

Using the wget command, grab the exa binary file.

$ wget -c

Download Exa command

With the binary file downloaded, unzip it.

$ unzip

This extracts the contents into a bin folder. The folder contains a single binary file called exa. This binary file needs to be copied to the /usr/local/bin path.

Therefore, navigate into the bin folder and move the binary file to the /usr/local/bin path.

$ cd bin
$ sudo mv exa /usr/local/bin

Copy exa command to local bin folder

Exa is now installed. To confirm this, verify the version as follows:

$ exa --version

Check Exa version

Using Exa

The exa command, without any options, lists the contents of a directory just as the ls command would. However, to reap the full benefits and the juice that exa provides, use the -l option for a long listing.

$ exa -l

From the output, you can see that all file attributes starting with file or directory permissions are color-coded. This is quite a huge contrast from what the ls -l command would provide.

Exa command usage

For more exa options, visit the Exa GitHub project page.

Exa – A modern replacement for ls command

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn