Exa – A Modern Replacement for “ls Command” Written in Rust

Exa is a lightweight, fast and modern replacement for the popular ls command on Unix-like operating systems. It is written in Rust programming language and comes with several additional features not available in the traditional ls command. Importantly, its options are similar, but not exactly the same, as for ls command as we shall see later on.

One of its special feature is the useful colors for differentiating between listed information about various types of files, such as the file owner, group owner, permissions, blocks, inode information etc. All this information is displayed using separate colors.

Exa Features:

  • Small, fast, and portable.
  • Uses colors for distinguishing information by default.
  • It can display a file’s extended attributes, as well as standard filesystem information.
  • It queries files in parallel.
  • It has Git support; allows viewing of the Git status for a directory.
  • Also supports recursing into directories with a tree view.

Requirements:

  • Rustc version 1.17.0 or higher
  • libgit2
  • cmake

Installing Exa in Linux Systems

The easiest way to install exa, is to download a binary file for your Linux distribution and place it under /usr/local/bin. Before doing this, you need to have the recommended version of Rust installed on the system by running the following commands.

$ curl https://sh.rustup.rs -sSf | sh
$ wget -c https://the.exa.website/releases/exa-linux-x86_64-0.7.0.zip
$ unzip exa-linux-x86_64-0.7.0.zip
$ sudo 
$ sudo mv exa-linux-x86_64 /usr/local/bin/exa

If you are brave enough to compile it from source, you can go ahead and install required development tools and build the latest development version of exa from source as shown.

-------------- Install Development Tools -------------- 
$ sudo apt install libgit2-24 libgit2-dev cmake  [On Debian/Ubuntu]
$ sudo yum install libgit2 cmake	         [On CentOS/RHEL]			
$ sudo dnf install libgit2 cmake	         [On Fedora]

-------------- Install Exa from Source -------------- 
$ curl https://sh.rustup.rs -sSf | sh
$ git clone https://github.com/ogham/exa.git
$ cd exa
$ sudo make install 

That’s it! now you can over to the section which shows how to use exa in Linux.

How to Use Exa in Linux Systems

Here, we will look at a few usage examples of exa command, the easiest being this:

$ exa
$ exa -l
$ exa -bghHliS
exa Command Examples
exa Command Examples

exa’s options are similar, but not similar to ls command, for more exa’s options and usage, visit Github project page: https://github.com/ogham/exa

If you have any questions or thoughts to share with us, please make use of the comment section below.

If you read this far, tweet to the author to show them you care. Tweet a thanks
Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

4 thoughts on “Exa – A Modern Replacement for “ls Command” Written in Rust”

  1. I made this wrapper script so that you can use the same switches as ls and so there is no need to learn any new ones.

    https://gist.github.com/eggbean/74db77c4f6404dd1f975bd6f048b86f8

    Reply
  2. It is *not* necessary to do

    $ curl https://sh.rustup.rs -sSf | sh
    

    if you just install the binary!

    The above command installs the rust compiler infrastructure needed for compilation from the source.

    Reply

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.