- 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!
Further Reading
For further reading and resources related to exa
and command-line file management in Linux, consider exploring the following links:
Exa Official GitHub Repository:
- This is the primary source for the exa tool, where you can find the latest updates, documentation, and source code.
- Exa GitHub
The Rust Programming Language Official Website:
- Since exa is built using Rust, this site provides comprehensive resources for learning Rust, which could be useful for those interested in exa's development.
- Rust Programming Language
Linux Command Line Basics:
- This is a useful resource for beginners who are just starting with Linux command lines and tools like exa.
- Linux Command Line Basics
Advanced Bash-Scripting Guide:
- For users looking to automate tasks using exa in scripts, this guide provides an in-depth look at scripting in bash.
- Advanced Bash-Scripting Guide
Git for Beginners:
- Since exa integrates with Git, understanding basic Git commands can enhance the usage of exa's features. This guide covers the fundamentals.
- Git for Beginners
These resources will help you deepen your understanding and enhance your skills in managing files via command line in Linux and potentially contribute to or customize tools like exa.