How to Install exa on Ubuntu 20.04/22.04- ls command alternative

Here in this tutorial, we will find out how to install and use Exa on Ubuntu 20.04 or 22.04 linux. The commands given here can be used on other Debian or Ubuntu-based systems as well.

exa is a modern alternative to the ls command. exa is a revised terminal command (with more features) for listing files or folders. Colors are used for a clearer presentation by distinguishing file types and metadata. Symlinks, Git, and other attributes are also taken into account. It’s small, fast, and just one single binary.


Steps to install and use exa on Ubuntu 22.04 or 20.04 LTS Linux

1. Perform a system update

The first thing we go with is running of system update command that will refresh the APT cache and install updates, if available.

sudo apt update && sudo apt upgrade


2. Install exa on Ubuntu 22.04 or 20.04

There is one problem that the Ubuntu 20.04 users will face, it is the exa package is not available to install directly using the APT package manager.  However, since Ubuntu 20.10, the users can install it via APT and official repo which means Ubuntu 22.04 Focal fossa just needs to run a simple APT command.

For only Ubuntu 20.04 Users:

Go to the GitHub release page of the Exa tool and download the latest available file for Linux platfrom of this tool in zipped format.

GitHub release page of Exa tool

Once the file is on your system, extract, and move it to /usr/local/bin.

Switch to the Downloads directory if you have used the browser to download the file.

cd Downloads

Now, extract and move the binary.

sudo apt install unzip
unzip exa-linux-x86_64-v*.zip -d exa
sudo mv exa/bin/exa /usr/local/bin/


For Ubuntu 22.04 Users:

Those who are using Ubuntu 22.04 LTS Jammy just need to run the given command to install exa on their system.

sudo apt install exa


3. How to use Exa

Compared to the traditional ls command, exa has different presets. In particular, the file sizes are more readable by default, which was previously possible, for example – with exa, the option is omitted, furthermore, the outputs are automatically output in a grid. However, most of ls’s options will work consistently with exa.

Here are some examples:

To simply view files and folders


For getting Tree View with assigned permissions

exa -l --T

For getting Tree View with assigned permissions

For just a tree view of files:

exa --T

For EXA Tree view


Grid View

Each file name is displayed in a grid that fits into the current terminal window. The size of the columns of the grid depends on the file names displayed. This “grid view” is the default setting.

exa -l --grid

Grid View


Headers for the columns and Git information

For a little more overview, you can display the corresponding headers for the individual columns of the long view.

exa -l --header

If you are in a Git repository, you can also display Git status information as well using:

exa --l --header --git

EXA command to list header and files


Recursion with limit

By default, exa displays everything when recursively displaying files and directories, if you do not need this information, you can limit the level of recursion. Change Level 2 with 3 or 4 as per your choice.

exa --recurse -l --level=2


Tree view with icons

It is possible to display Unicode icons for the most common file types, using the file extension and not the actual file type.

exa --icons -T


Display file with times

You can also display all file times (created, changed, last access), and use other options to design them accordingly so that you only get the times and the file name.

Here we are calling multiple options to display data accordingly and omitting the display of file permission and size information.

exa --long --header --changed --modified --created --accessed --no-permissions --no-filesize --sort created --reverse --time-style=long-iso

Display files by date using EXA ubuntu command


To display the total number of files:

You can also use the count and display how many fires are there in your current directory.

exa | wc -l


To know available Exa options

You can use the Help command:

exa --help

Install Exa on Ubuntu 20.04 or 22.04


Other Articles:

How to install Git on AWS EC2 Amazon Linux 2
48 Basic Linux commands and questions
List of Commands to get Linux system info using terminal
Common Linux Shell commands to start using terminal



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.