exa is a modern replacement for the command-line program ls
that ships with Unix and Linux operating systems, 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. By deliberately making some decisions differently, exa attempts to be a more featureful, more user-friendly version of ls. In this article, we look at Exa
– a modern replacement for ls command-line tool
.
Prerequisites for installing Exa
Before you proceed in getting Exa on your system, ensure that you have the following requirements:
- Rust Programming language ( Version 1.17.0)
- libgit2
- cmake
[ads]
Installing Exa in Linux Systems
First, download and install the official compiler for the Rust programming language as shown:
$ curl https://sh.rustup.rs -sSf | sh
Thereafter, you will be presented with a list of options as shown. Select the first option which is going to add the bin directory for cargo to your $PATH.
The installer will continue downloading all the necessary components and updates and upon successful installation. Next up, download the Exa zip file from the Official site as shown.
$ wget https://github.com/ogham/exa/releases/download/v0.9.0/exa-linux-x86_64-0.9.0.zip
Once downloaded, unzip the file to retrieve exa-linux-x86_64 the binary file which we are going to place it in the /usr/local/bin directory.
$ unzip exa-linux-x86_64-0.9.0.zip
Finally, move the binary file to the bin directory so that it can be accessed on the CLI.
$ sudo mv exa-linux-x86_64 /usr/local/bin/exa
That is it!
How to Use Exa in Linux Systems
Here, we will look at a few usage examples of exa command:
[ads] To get the most out of the command, append the -l
flag as shown. This will display colorized output as shown.
$exa -l
The command below displays additional information such as inodes, file/directory size, Blocks, User and Group to mention a few.
$ exa -bghHliS
If you feel difficult to use exa, simply add following alias on your .bashrc file.
$ echo "alias ls=exa" >> ~/.bashrc $ source ~/.bashrc
Now you can access exa command features within ls command. To know more about exa command navigate to man page.
$ exa --help
That’s it all! If you have any questions or feedback, feel free to leave a comment.
I personally use lsd (https://github.com/Peltoche/lsd). It’s another good ls replacement written in Rust.