6 alternative CLI tools I immediately install on Linux


The standard utilities on Linux are boring; have you ever noticed that? Their function is essential, but they’re boring. Wouldn’t you like to jazz up their outputs with some pretty colors? Or even speed them up? These terminal utilities do that and more.

bat: Like cat, but better

A modern and readable cat replacement

A terminal window displays code with syntax highlighting. This is the output of the bat command.

Cat was the first command that I ever learned, and it remains one of my most frequently used. However, it’s showing its age because it only displays plain old, unformatted text. It’s often difficult to read complex files, such as config files, code, JSON, or YAML.

Bat is just like cat, except better. It addresses the readability issue by highlighting complex files with pretty colors (aka syntax highlighting). It makes files much easier to read because the sections and boundaries stand out.

Bat has some additional features that make it more attractive, like integration with Git to flag changed lines. It can also work with other tools, such as fzf or find, to display color preview windows.

Bat is universally available; you will find it in almost every distro repository.

ripgrep: grep on steroids

Super-fast and super-smart

A terminal window displays a list of search results, with a search term highlighted in red.

Like all the other utilities that I will mention, ripgrep is an upgrade on its standard counterpart. Its main selling point is speed: it does multiple searches in parallel, where its elder counterpart, grep, does not. Ripgrep leverages the power of modern CPUs by spreading its work across all CPU cores.

Ripgrep is not just blazingly fast; it also has a long list of useful features, like smart case detection, ignoring specific files and folders, and integration with other applications.

Illustration of the Linux mascot Tux with a surprised expression, emerging from the center of a broken terminal window, surrounded by warning icons, and 'broken' written in neon text.


How I Use the Linux Terminal Without Destroying My OS

Be careful running commands to keep your system ship-shape.

Smart case detection is a simple and elegant feature that should be part of every search function out there. It simply means that if you use capital letters in your search term, then the search becomes case-sensitive. It’s an often missing quality-of-life feature.

Ripgrep also ignores specific files and folders, as directed by a gitignore or ignore file. For example, the following file would cause ripgrep to ignore all images called foo.jpg or directories called ignored_dir.

ignored_dir/
**/foo.jpg

Ripgrep has excellent integration with other applications. Emacs, Vim, Neovim, and fzf all have third-party extensions that provide ripgrep integration; this enables these applications to leverage ripgrep’s powerful search capabilities directly. Fzf (another utility) provides advanced features that work well with ripgrep, as you will see later.

That’s not all; Ripgrep can also search through compressed files with the Z flag. If you have an extensive directory of text and compressed files, ripgrep can tear through them all without manual decompression. Because it doesn’t detail much about the match, it’s a little underwhelming; however, it does save a lot of time and awkwardness.

Ripgrep is available in most distro repositories, so refer to your distro’s manual for package installations.

delta: ripgrep on steroids

Doubling up the ripgrep goodness

Delta is typically for programmers, and it’s one of my favorite utilities. Ripgrep does a fantastic job at quickly tearing through files to find exactly what you need; it has modern features and an advanced search syntax. However, the output is bland because it lacks color and context. While some might argue that it’s straightforward and focuses solely on the search term, I find that I need more. When searching for code, I want to see the surrounding context and colors, because both help to separate the wheat from the chaff.

For those of you who are programmers (or starting out), delta applies syntax highlighting to ripgrep’s output. It also provides extra features to integrate with Git, which is a document management system. For example, it provides a nice side-by-side view of changes to documents (aka a diff, which is short for difference).

Tux the penguin with a Linux terminal.


Why Do Linux Fans Like the Terminal So Much?

It’s not required, but it’s still a great tool.

Git can manage any kind of text document, and people often use it to save their dotfiles (aka configuration files that start with a period). If you’re interested in saving your dotfiles, I would highly recommend saving them with Git. In that case, delta would also be worth a look, if only for the diff view alone.

You can install delta via the official repositories for Debian, Ubuntu, Fedora, Arch Linux, and a few more, under the name git-delta. It’s also available via Homebrew and Nix.

fd: A faster find with prettier colors

Another modern solution to age-old problems

A terminal window displays dozens of file paths. These are search results for the fd command.

As the heading states, fd is much like find, except it’s significantly faster and with prettier colors. Colors, as previously mentioned, make search results easier to read and distinguish. Fd color-codes different file types and directory paths.

In addition to its use of colors, fd traverses multiple directory trees in parallel, which takes advantage of multiple cores in modern CPUs. This capability extends beyond just directory traversal; it also applies to command execution too. When you use the X flag, fd runs a command in parallel against every match.

fd foo.txt -x bat --color=always

Like ripgrep, fd also supports smart case searches, and it also obeys the gitignore file, so searches are more convenient and drown out the noise by default.

Fd is available for almost every distro out there, so to install it, refer to your distro’s package manager or manual.

eza: A modern replacement for ls

Easy readability and navigation

Eza is a modern take on the standard ls command, and its main features are better color support and icons. Although not essential, I find icons a nice touch, but for me, colors are essential.

Eza has some other nice features, such as tree view and hyperlinks. For example, the hyperlinks flag converts all file and directory names into clickable links using the OSC 8 format. Most terminals support these links, but to be sure, you can refer to the unofficial list of terminals that support OSC 8 hyperlinks. Every terminal is different, and you may need to activate it manually.

Linux mascot wearing sunglasses and using a laptop, surrounded by floating windows with the i3 Window Manager logo in the background.


Hone Your Linux Skills With These 6 Free Games

Learning Linux the fun way.

The best part is that the hyperlinks also work with the tree view, which means that you can quickly navigate large directories. However, one issue that I’ve noticed is that eza’s tree view is much slower than the standard tree: tree will stream results as they’re encountered, whereas eza will navigate the entire (sometimes large) directory and display them all at once—this can take some time, but it has pretty colors and clickable links!

The last point is that it’s annoying to type eza –icons every time, so you may want to read our guide on how to create an alias.

Eza is available for most popular distros, so you can refer to your distro’s package manager. However, the installation on Debian and Ubuntu requires a custom APT repository, but eza’s homepage covers this.

Keep it fuzzy

A terminal window displays a list of commands. This is the output of the fzf History Search command.

Whether you’re a beginner or a veteran, using a fuzzy search tool for your shell history is essential—it’s the single most important tool that I have. It’s tedious to type out commands, so I only want to do it once. It’s also tedious to search for previous commands, because using the up and down keys slows my workflow down to a crawl. A fuzzy search tool solves both of these problems.

If you don’t know what a fuzzy search is, it simply means a close approximation search. For example, typing emp or xpe will match example. Why is that important? Because I can’t remember a command that I typed two months ago, or because quickly switching between several commands takes a toll on my memory. I only need to remember a few characters in the command, and the fuzzy search tool quickly narrows down the search in real time.

For years, I have relied on the fzf History Search plugin for zsh. Alternatively, there is a standalone tool called Atuin that is nearly identical. Both do a simple but effective job.

Refer to fzf History Search’s GitHub repository for installation instructions. You may also want to follow our guides on how to install Oh-My-Zsh and how to install fzf. An alternative and easier approach is to read our guide on how to install and use Atuin.

A bonus script to search through files like a pro

A special trick, just for you

A terminal window that is split horizontally. The top half displays code with syntax highlighting. The bottom half displays a list of file paths.

If you install fzf, ripgrep, and bat, you can use the following awesome command to fuzzy search your file system and open the matched lines in your favorite text editor. Place the following command in your bashrc file and then reload it with source bashrc. Refer to our guide on how the bashrc file works for more information.

s () {
  fzf --ansi --disabled \
      --bind "change:reload:command \
          rg --line-number --no-heading --color=always --smart-case {q} \
          || :" \
      --bind "enter:execute(${EDITOR:-nano} +{2} {1})" \
      --delimiter ":" \
      --preview "command bat -p --color=always {1} --highlight-line {2}" \
      --preview-window 'up:80%,border-bottom,~3,+{2}+3/3'
}

The previous command defaults to opening files in nano, but you can set it to use Vim, Neovim, Emacs, and a few others. Simply set the editor variable in your bashrc and reload it:

export EDITOR=nvim

To use the script, simply change to a directory that contains text files and the letter “s.” While this command will accept plain old words for search terms, you can dramatically boost its accuracy if you follow our guide on Regex, an advanced search syntax that you can learn in an hour.


These tools aren’t just useful, they’re essential

Without fzf History Search, ripgrep, and delta, I feel lost, and so they’re often the first tools that I install. Without eza, bat, and fd, the terminal feels plain and unreadable. However, this is not an exhaustive list, and I have detailed even more terminal utilities to monitor system resources.



Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


Serials have become the backbone of the streaming era, especially on Netflix. Serialized television is when a show’s plot unfolds in sequential order over the course of a season. It’s long-form storytelling that typically works best with dramas—Stranger Things, The Crown, etc. Watching the episodes in release order matters. Often, these shows are binged because the complex character arcs and cliffhangers encourage streaming multiple episodes at once.

Serial shows can feel like homework, especially when you fall behind on an episode and need to catch up. That always happens to me, and it leads to anxiety I didn’t want. Thankfully, Netflix offers shows where viewers can jump at any time and not feel lost. These episodic series are perfect for jumping around and picking the episodes you want to watch. One of the most famous comedies ever fits the criteria of an episodic sitcom. Anthology shows, including a Netflix sci-fi classic, are also ideal for watching episodes out of order.

Black Mirror

Welcome to your worst nightmare

Black Mirror wants to scare you. Charlie Brooker’s sci-fi anthology series has been warning humanity about the dangers of technology since 2011. It seems like ages ago that Rory Kinnear had sexual intercourse with a pig in the first episode. Apologies for the spoiler, but the media’s role in the spread of misinformation has never been more relevant.

Black Mirror features self-contained episodes with a beginning, middle, and an end. There has only been one direct sequel: USS Callister: Into Infinity, a season 7 episode that continues the events of season 4’s USS Callister. Otherwise, feel free to jump around and check out the best episodes of each season. Since most episodes feature bleak endings, I’ll leave you with one that ends on an upbeat note: San Junipero.

Seinfeld

Greatest comedy ever?

Comedies are the perfect vehicle for episodic storytelling. While having an overarching plot throughout a season helps attract viewers, many comedy fans are just looking for a few laughs. Write a self-contained story with numerous jokes over 20 to 30 minutes, and you’re ready to go. Seinfeld, aka the show about nothing, is the ideal escape from serialized dramas.

Seinfeld stars Jerry Seinfeld as a fictionalized version of himself as he navigates the comedic scene in New York City. The show revolves around Jerry’s interactions with his friends George (Jason Alexander), Elaine (Julia Louis-Dreyfus), and Kramer (Michael Richards). The gang faces a problem, hilarity ensues, and the episode ends. That’s really all you need to know. Enjoy the laughs.

Guillermo del Toro’s Cabinet of Curiosities

The genre maestro curates new horror stories

There’s a reason why Guillermo del Toro is considered the “King of the Monsters.” The genre expert is as elite as it comes when dealing with mythology and creating new worlds. The Oscar winner relied on his horror expertise in the anthology series Guillermo del Toro’s Cabinet of Curiosities.

I hate referring to episodes of television as “mini-movies.” However, that’s how I would describe the eight episodes of Cabinet of Curiosities. Each director puts their own signature style on a story and brings audiences into their terrifying creation. Del Toro wrote two of the episodes, including one about a demon being summoned. Some are scarier than others, but horror fans will feel right at home with this series. ​​​​​​​

Beat Bobby Flay

Bobby brings the heat

As I’ve gotten older, the Food Network has become one of my favorite channels. I mean, who doesn’t love food? I love eating my (average) home-cooked meal while watching contestants duke it out in the kitchen on my favorite show, Beat Bobby Flay. The competition breaks down into two rounds. In the first round, two chefs have 20 minutes to construct a meal using a secret ingredient. The winner advances to the main event, where they face off against Bobby Flay.

The challenger gets to pick the dish for the final round, so Bobby has a disadvantage. However, Bobby is an award-winning chef with a few tricks up his sleeves. He can handle making a version of your grandmother’s lasagna. With episodes available on Netflix, be prepared to learn why Bobby always throws chiles into his dishes.​​​​​​​

S.W.A.T.

Broadcast TV still knows how to make entertaining programs

The procedural is a genre best produced on broadcast television. Name a cop, doctor, or law drama—chances are it’s a procedural on broadcast TV. While the way we watch television has changed, people still love these types of shows on CBS, NBC, Fox, and ABC. Law & Order, NCIS, and Criminal Minds are procedurals that gained a bigger following thanks to streaming.

S.W.A.T. is cut from the same cloth as Chicago P.D. and CSI. Sergeant Daniel “Hondo” Harrelson (Shemar Moore) is tasked with leading a new S.W.A.T. unit in the LAPD. This action-packed show utilizes a “case of the week” formula in which the team must solve a dangerous situation, such as active shooters and hostage situations. You’re in and out in 44 minutes. What’s better than that?​​​​​​​


Netflix has more content coming your way

After you’re done watching these shows, stay on Netflix for more top-notch content. Netflix has an entire section dedicated to thrillers, and this week, The Guilty and El Camino are two of the section’s best. Keep an eye out for new movies, like Alan Ritchson’s War Machine, which is currently in the streamer’s top 10.

Subscription with ads

Yes, $8/month

Simultaneous streams

Two or four




Source link