DEV Community

Cover image for Add some flavour to your ls
Sharad Raj (He/Him)
Sharad Raj (He/Him)

Posted on

Add some flavour to your ls

Originally published at my blog

Most of us use ls just the way it is provided by default but today we are going to add some flavour to boring ls using exa, as they say exa is a modern version of ls.

But wait a minute before we begin the setup lets see what is the difference between the ls before and afterwards.

Before exa

Before exa

After exa

After exa

So Let's begin !!!

STEP-1: Installing exa using cargo

If you don't have cargo already installed you need to install it first and then proceed further.

Ubuntu users can install it via apt

sudo apt-get install cargo
Enter fullscreen mode Exit fullscreen mode

For other distros visit this link, it will take just few minutes.


Now that you have cargo installed run the following command

cargo install exa
Enter fullscreen mode Exit fullscreen mode

it will take around 4-5 minute because of the build process of exa

STEP-2: Adding exa to the PATH

Open your terminal's rc file and just add the following to it

# PATH
export PATH=$HOME/.cargo/bin:$PATH

# Alias
alias ls="exa -al --color=always --group-directories-first"
Enter fullscreen mode Exit fullscreen mode

That's it

you have successfully configured your terminal with the fancy ls :)

Top comments (0)