New options for traditional Unix commands
Command Line – Alternative Unix Commands
If you are looking for modern display options or more speed at the command line, these alternatives to traditional Unix commands may be just what you need.
The development of Unix began over 50 years ago. In contrast to commercial software, most of Unix's basic commands are still in use today. However, in the past couple decades, alternatives have been developed for a variety of reasons. For instance, restrictions such as lack of memory or color monitors or limits on file name lengths have long since disappeared, opening the way for more to be done with a command. Also, now that desktop environments are the norm, users demand more even at the command line. Sometimes, too, commands or some of their options have become obsolete or too numerous and too complex for their most common uses, resulting in the desire for simplification. At other times, developers want to try their hand at developing an improved version. Here are some of the new options for some common traditional commands.
tree or exa for ls
As one of the most commonly used commands for command-line navigation, ls
is a popular choice for updating. If nothing else, the fact that many distributions routinely alias ls
for ls --color
highlights how much room there is for improvement. It's not surprising, then, that at least half a dozen replacements for ls
exist, all of them routinely using color as well as other enhancements.
One popular replacement is tree
. As the name suggests, tree
displays results in a tree structure, making the results easier to read (Figure 1). With tree
, you can specify the tree's depth, as well as the full path to each file. Conveniently, tree
also includes five sorting orders. Also useful, tree
allows for the customization of colors through environmental variables and shows the path to the original file for symlinks.
Another popular ls
replacement, exa
(Figure 2), starts with color and human-readable file sizes enabled, as well a variety of display options, ranging from one entry per line and a table for long forms. Like tree
, exa
has options for a tree view and different sorting orders according to different file attributes.
bat for cat
Although many users prefer the less
command, cat
remains a popular choice for viewing text files. As a complete replacement for cat
, bat
also adds syntax highlighting. If a file is longer than the screen, bat
will display the file using less
to make scrolling back and forth easier (Figure 3). For coders, bat
integrates with git
.
tldr for man
Man pages are the most common form of Linux documentation for commands. Unfortunately, their quality varies with the writers. Some man pages lack context and examples, and some are too technical for average users. Moreover, even the best-written can be long and complex. While tldr
(which stands for "too long; didn't read," a common synonym for summaries) [1] does not replace man pages, it does give clear, concise explanations and covers the most common use cases (Figure 4). To install the tldr
database, you need to install the Node.js client and run:
npm install -g tldr
or you can install the Python client with:
pip3 install tldr
The first time you use tldr
, there will be a short delay while the database is created. Once that is done, tldr
has a similar or faster response time than that of man
.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Wine 10 Includes Plenty to Excite Users
With its latest release, Wine has the usual crop of bug fixes and improvements, along with some exciting new features.
-
Linux Kernel 6.13 Offers Improvements for AMD/Apple Users
The latest Linux kernel is now available, and it includes plenty of improvements, especially for those who use AMD or Apple-based systems.
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.