- Posted on
- • Software
exa: Enhanced `ls` replacement
- Author
-
-
- User
- Linux Bash
- Posts by this author
- Posts by this author
-
Discover Exa: A Modern Replacement for ls
in Linux
When it comes to working with files in a Linux environment, ls
has been the go-to command for listing directory contents for decades. It serves its purpose well, but for advanced users and those who crave more detailed and visually appealing output, there's a better tool available. Enter exa
, a modern, improved replacement for ls
that comes with more features and better defaults.
What is Exa?
Exa is a command-line tool designed to be a modern replacement for the venerable ls
command. It integrates seamlessly with modern workflows, offering features like git integration, tree views, and more informative, color-coded displays. The tool is written in Rust, ensuring it's both fast and reliable.
Features of Exa
Some of the standout features of exa include:
Colorful Output: Makes it easier to distinguish file types and permissions.
Git Integration: Shows git status for each file right in the file list.
Tree View: Displays directory structures in a tree-like format similar to the
tree
command.Extended Information: Exa can show additional file metadata that helps with detailed inspections without running multiple commands.
Installing Exa on Linux
Installing exa is straightforward. Below is a guide on how to install exa using various package managers such as apt
, dnf
, and zypper
.
Ubuntu and Debian-based distributions
First, you'll need to add the repository that contains exa, as it might not be available in the default Ubuntu repositories:
sudo add-apt-repository ppa:chrismin13/exa
sudo apt update
Next, install exa using apt
:
sudo apt install exa
Fedora, CentOS, and RHEL
For Fedora and other systems using dnf
, just use the following command:
sudo dnf install exa
Note that on CentOS or RHEL, you might need to enable the EPEL repository first, or alternatively, download and compile the source code if a package is not available through dnf
.
openSUSE
On openSUSE, you can use zypper
to install exa:
sudo zypper install exa
Using Exa
Once installed, you can start using exa immediately. Here are some basic commands to get you started:
List Files: Simply use
exa
instead ofls
.Long Listing Format: Use
exa -l
for more detailed information, similar tols -l
.Tree View: Use
exa -T
to get a tree view of your directories.View Hidden Files: Use
exa -a
to show hidden files (similar tols -a
).
Configuring Exa
For those who plan to use exa as their primary file listing tool, you might want to alias ls
to exa
. You can do this by adding the following line to your .bashrc
or .zshrc
:
alias ls='exa'
Conclusion
Exa provides a rich set of features that can enhance productivity and usability over the traditional ls
command. With its modern enhancements and ease of use, exa is quickly becoming the go-to command-line tool for file system exploration for many Linux users. Whether you are a developer, system administrator, or a daily Linux user, exa can significantly improve your workflow with its powerful features and intuitive usage. Give it a try and see how it transforms your command-line file management experience!