After my last article covering the ls command and its options, I was thinking about the shelf life of some commands and the improvements that you would have expected to see over the years. This kicked off a memory in my brain from All Things Open (ATO) 209 where IBM’s Chris Waldon hosted a talk on Terminal Velocity: Moving fast in your shell. If that title sounds familiar, it's because he wrote an article based on this talk. Anyway, during the ATO presentation, he featured a tool called exa that's a replacement for ls and I was pretty impressed with it. It turns out that some commands have been improved upon via well-executed, modern replacements. The exa utility is one of them.

So, what is exa? 

exa, as I mentioned earlier, is an improvement on the classic ls command. At its heart, it serves to display listing information for all files and directories in your current working directory. It doesn’t sound all that exciting, does it? There is, however, more on offer here than you might initially think. 

ls vs exa

What improvements has exa made over ls? 

The design approach around exa is simple. More is better. If you browse the webpage, you’ll find that the creator put a lot of thought into why ls was so spartan. It makes a lot of sense. In the 1960s, computers were exponentially more limited by processing time for the input of commands and the output of results. The original command line suite of commands was built with this I/O bottleneck in mind. With today’s advancements in computing technology, most of us have supercomputers in our pockets that can handle these tasks with ease. So, of course, modern servers and desktops can handle whatever we throw at them in most circumstances.

exa runs the stat system call on every single file it encounters. It then takes the information gleaned from this call and color codes it by permission type, owner, size, and more. One of the first things you’ll notice when using exa is how colorful things are. If you're one of those weird people who prefer the drab black and white of a traditional terminal output, you can opt-out of the color usage if you want. For everyone out there who uses git repositories for change management, exa also displays the git status of files when applicable. As of this writing, only two git changes are currently tracked:

  • N - new file
  • M - an existing file

Installation and Aliasing

If these features look appealing to you, I recommend that you install exa and give it a try. Exa is packaged for a number of distributions. On Fedora, install the rust-exa package with sudo dnf install exaYou can also install in on Red Hat Enterprise Linux (RHEL), albeit manually, and it works on macOS as well. For detailed installation instructions, be sure to check out the official exa webpage

Once you have the program installed, you may want to alias it over your standard ls command. My alias looks something like this: 

exa alias to ls

I encourage you to give it a try.  You might enjoy the tool and, if nothing else, it might get you thinking of other improvements that we need as sysadmins.

Want to try out Red Hat Enterprise Linux? Download it now for free.


About the author

Tyler is the Sr. Community Manager at Enable Sysadmin, a submarine veteran, and an all-round tech enthusiast! He was first introduced to Red Hat in 2012 by way of a Red Hat Enterprise Linux-based combat system inside the USS Georgia Missile Control Center. Now that he has surfaced, he lives with his wife and son near Raleigh, where he worked as a data storage engineer before finding his way to the Red Hat team. He has written numerous technical documents, from military procedures to knowledgebase articles and even some training curricula. In his free time, he blends a passion for hiking, climbing, and bushcraft with video games and computer building. He is loves to read and enjoy a scotch or bourbon. Find him on Twitter or on LinkedIn.

UI_Icon-Red_Hat-Close-A-Black-RGB

Browse by channel

automation icon

Automation

The latest on IT automation for tech, teams, and environments

AI icon

Artificial intelligence

Updates on the platforms that free customers to run AI workloads anywhere

open hybrid cloud icon

Open hybrid cloud

Explore how we build a more flexible future with hybrid cloud

security icon

Security

The latest on how we reduce risks across environments and technologies

edge icon

Edge computing

Updates on the platforms that simplify operations at the edge

Infrastructure icon

Infrastructure

The latest on the world’s leading enterprise Linux platform

application development icon

Applications

Inside our solutions to the toughest application challenges

Virtualization icon

Virtualization

The future of enterprise virtualization for your workloads on-premise or across clouds