Linux tool alternatives: 6 replacements for traditional favorites (2024)

Posted: July 27, 2022 | | by Jose Vicente Nunez (Sudoer)

Image

Linux tool alternatives: 6 replacements for traditional favorites (1)

You've mastered a Linux tool, but that hard-earned knowledge came at the cost of frequent usage, reading the manual pages, and using a search engine to avoid the bad examples out there.

So what incentive do you have to learn and replace your tools with new utilities? Here are a few reasons:

  1. You want to be more productive to do more in less time, and a different tool can provide that.
  2. A different tool mightmimic the way you work. It is nice to use a tool that works just the way you expect.
  3. A new tool challenges how you do things. This is important because as you improve, so do the tools and technology around you. It is good when a utility forces you to think outside the box.

This article offers a few interesting new tools to consider using. When evaluating a new tool, consider the community around it, whether it's easy to use, and if it has the functionality you need.

[ Boost your command line skills. DownloadA sysadmin's guide to Bash scripting. ]

One last thing: The topic of "replacement tools" is always controversial, so be open-minded and try them. There is nothing wrong with the original tools mentioned in the article; these are just options that might help you work better.

Also, for obvious reasons, this article doesn't cover every available tool. Consider this list as a starting point.

Before starting

Here are some things to keep in mind as you try out these new tools:

  • You should be familiar with Linux's command-line interface (CLI). If you're not, read this article to get started.
  • Some of these utilities may not be on your system and will require elevated privileges to install with tools like RPM.
  • It might be better to install some tools under your user, rather than system-wide, with installers like pip.

OK, it's time to try some new tools.

htop and glances: Better than top

The top utility is one of the best general-purpose resource monitoring tools on Linux. It has nice features like saving stats into a file and sorting columns by criteria.

[ Learn what the first five lines of Linux's top command tell you. ]

In the same spirit, the htop command displays more information (like how hard each CPU core is working). Below is a sample session showing how to filter, sort, and search processes using htop:

What makes this tool stand apart? The user interface gives you access to powerful operations with ease.

To install htop on RPM-based distributions:

$ sudo dnf install -y htop

Glances is another tool that gives you lots of information about your system, much likehtop:

Why is there another tool like htop? Well, glances has several features that make it interesting:

  1. It can run in server mode, allowing you to connect to it using a web browser or with a REST client.
  2. It can export results in several formats, including Prometheus.
  3. You can write plugins to extend it in Python.

To install it, you can use a virtual environment or do a user installation:

$ pip install --user glances

smem: When you're focused on memory

Utilities like top, htop, and glances give you a full array of details about your server, but what if you are concerned only about memory utilization? In that case, smem is a great option:

It is possible to filter by user, show totals, group usage by users, and even create plots with Mathlib.

To install smem on Fedora Linux:

$ sudo dnf install -y smem

ripgrep: Faster than grep

The grep utility is probably one of the most well-known filtering tools; if you've ever needed to find files with a filter, chances are you used grep.

[ Happy with the usual option? Download the Linux grep command cheat sheet. ]

A nice replacement for grep is ripgrep. It is fast and has modern features that grep doesn't have:

  1. It can export the output to JSON format. This is a great feature for data capture or interaction with other scripts.
  2. It provides automatic recursive directory searches, skipping hidden files and common ignorable backup files.

Start by comparing a regular recursive grep that only looks inside files with extension *.pyb, using a case-insensitive search:

$ time grep --dereference-recursive --ignore-case --count --exclude '.ipynb_*' --include '*.ipynb' death COVIDDATA/COVIDDATA/.ipynb_checkpoints/Curve-checkpoint.ipynb:0COVIDDATA/.ipynb_checkpoints/EUCDC-checkpoint.ipynb:37COVIDDATA/.ipynb_checkpoints/Gammamulti-checkpoint.ipynb:11COVIDDATA/.ipynb_checkpoints/Gammapivot-checkpoint.ipynb:11# ... Omitted outputCOVIDDATA/tweakers/zzcorwav.ipynb:10real0m0.613suser0m0.505ssys0m0.105s

Note that it shows the Jupyter .ipynb_checkpoints/* checkpoint files. Next, see ripgrep (rg) in action:

$ time rg --ignore-case --count --type 'jupyter' death COVIDDATA/COVIDDATA/tweakers/zzcorwav.ipynb:10COVIDDATA/tweakers/zzbenford.ipynb:2COVIDDATA/tweakers/EUCDC.ipynb:19COVIDDATA/Modelpivot.ipynb:9COVIDDATA/experiment/zzbenford.ipynb:2COVIDDATA/experiment/zzcorwavgd.ipynb:10# ... Omitted outputCOVIDDATA/experiment/zzcasemap.ipynb:13real0m0.068suser0m0.087ssys0m0.071s

The command line is shorter, and rg skips the Jupyter checkpoint files without any extra help. Check below to see rg working with a few flags:

Install ripgrep on Fedora Linux using DNF:

$ sudo dnf install ripgrep

drill (ldns): More informative than dig or nslookup

Skip to the bottom of list

Image

Download now

If you need to find the internet protocol (IP) address of a given DNS record, you probably usedig or nslookup. These commands have been around so long that they have entered and left the deprecation state.

A tool that offers the same functionality and is more modern is drill (from the lndns project). Say you want to see the MX (Mail Exchangers) for the nasa.org domain:

$ dig @8.8.8.8 nasa.org MX +noall +answer +nocmdnasa.org.3600INMX5 mail.h-email.net.

The drill command gives you the same information, plus some more:

$ drill @8.8.8.8 mx nasa.org;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 50948;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION:;; nasa.org.INMX;; ANSWER SECTION:nasa.org.3600INMX5 mail.h-email.net.;; AUTHORITY SECTION:;; ADDITIONAL SECTION:;; Query time: 126 msec;; SERVER: 8.8.8.8;; WHEN: Sun Jul 10 14:31:48 2022;; MSG SIZE rcvd: 58

What does this mean to you?

  • drill can be used as a drop-in replacement for dig.
  • It is good to have a separate implementation of DNS tools to troubleshoot and diagnose bugs.

Distribution maintainers and application developers have more compelling arguments to use ldns:

Here is a small program that can query the MX records for a given list of domains:

Install ldns on Fedora Linux like this:

$ sudo dnf install -y python3-ldns ldns-utils ldns

Rich-CLI: One CLI to render all formats

Let's face it: It is quite annoying to use different tools to render different data types nicely on the command-line interface (CLI).

For example, here's a JSON file (no special filtering):

$ /bin/jq '.' ./.thunderbird/pximovka.default-default/sessionCheckpoints.json{ "profile-after-change": true, "final-ui-startup": true, "quit-application-granted": true, "quit-application": true, "profile-change-net-teardown": true, "profile-change-teardown": true, "profile-before-change": true}

An XML file:

$ /bin/xmllint ./opencsv-source/checkstyle-suppressions.xml<?xml version="1.0"?><!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.0//EN" "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd"><suppressions> <suppress files="." checks="LineLength"/> <suppress files="." checks="whitespace"/> <suppress files="." checks="HiddenField"/> <suppress files="." checks="FinalParameters"/> <suppress files="." checks="DesignForExtension"/> <suppress files="." checks="JavadocVariable"/> <suppress files="." checks="AvoidInlineConditionals"/> <suppress files="." checks="AvoidStarImport"/> <suppress files="." checks="NewlineAtEndOfFile"/> <suppress files="." checks="RegexpSingleline"/> <suppress files="." checks="VisibilityModifierCheck"/> <suppress files="." checks="MultipleVariableDeclarations"/></suppressions>

A markup file? A CSV file? A Python script? You see where this is going; a different application for each type. Some of them offer syntax colorization, and others do not. If you want pagination, you most likely need to pipe the output to less—but then kiss colorization goodbye.

[ Free download: Advanced Linux commands cheat sheet. ]

Enter Rich-CLI (an application that's part of the Textualize project) to the rescue. Below I revisit the two files I opened before, this time using rich. First, here is the JSON file:

$ rich ./.thunderbird/pximovka.default-default/sessionCheckpoints.json{ "profile-after-change": true, "final-ui-startup": true, "quit-application-granted": true, "quit-application": true, "profile-change-net-teardown": true, "profile-change-teardown": true, "profile-before-change": true}

Next, here is the XML file I demonstrated earlier:

$ rich ./opencsv-source/checkstyle-suppressions.xml<?xml version="1.0"?><!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.0//EN" "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd"><suppressions> <suppress files="." checks="LineLength"/> <suppress files="." checks="whitespace"/> <suppress files="." checks="HiddenField"/> <suppress files="." checks="FinalParameters"/> <suppress files="." checks="DesignForExtension"/> <suppress files="." checks="JavadocVariable"/> <suppress files="." checks="AvoidInlineConditionals"/> <suppress files="." checks="AvoidStarImport"/> <suppress files="." checks="NewlineAtEndOfFile"/> <suppress files="." checks="RegexpSingleline"/> <suppress files="." checks="VisibilityModifierCheck"/> <suppress files="." checks="MultipleVariableDeclarations"/></suppressions>

See the demo below for rendering multiple file types with a single command:

Installation is trivial with pip:

$ pip install --user rich-cli

Wrap up

You don't need to settle for the default tools that come with the Linux operating system. Many Linux tools offer new functionality that will make you more productive. And if more people use them, they will become the default tools.

Also, when evaluating any tool, look at its community and how often it is updated for bugs and new features. An active community is as important as the tool itself.

Topics: Linux Command line utilities

Linux tool alternatives: 6 replacements for traditional favorites (2024)

FAQs

What is etc alternatives in Linux? ›

The default /etc/alternatives directory containing symbolic links. A name (for example, /usr/bin/edit ) that refers to one file out of several available using the alternatives system. A set of related symbolic links that can be updated as a group.

What is the tldr tool for Linux? ›

The TLDR (stands for “Too Long; Didn't Read“) is a community-driven project that provides concise and simplified documentation for various Linux commands. You might also like: 6 Useful Tools to Remember Linux Commands Forever.

What is the replacement for dig in Linux? ›

Uses of dog command. As dog command also works similar to dig command, you can run the dog command with the same use cases of dig command. It can be used to query different DNS records such as A, TXT, NS, MX, AAAA and so on.

What are alternatives to find in Linux? ›

The fd command is a popular alternative to the find command in Linux. It is a faster and more user-friendly version of find, and is written in Rust for performance.

What is ECT in Linux? ›

In the Linux operating system, the '/etc' directory is a crucial part of the file system, standing for "et cetera" and containing configuration files and directories. The '/etc' directory holds various configuration files that are essential for the proper functioning of the system and its installed applications.

How to add an alternative in Linux? ›

6.1. Adding New Alternative With install
  1. /usr/bin/editor – the alternative link – it's the same for all alternatives.
  2. editor – the generic name – it corresponds to the link.
  3. /usr/bin/micro – the path to the actual editor.
  4. 100 – new alternative's priority.
Jul 24, 2024

Is dig better than nslookup? ›

Dig produces more informative and thorough results. It also contains other data, such as the server used for the query and its time. The improved output is useful for identifying DNS issues.

What is the alternative to dig? ›

Using the "host" Command Instead of "dig"

An alternative to dig is a command called "host". This command functions in a very similar way to dig, with many of the same options. Notice how you do not need a flag to change the functionality from regular DNS lookup to reverse DNS lookup.

What is the dig command equivalent to? ›

Nslookup. The nslookup command is helpful in diagnosing issues with DNS name resolution. This command is comparable to Mac or Linux's dig function. It can find the IP address of a host or perform a reverse DNS lookup (to find the domain name of an IP).

What is the alternative to Linux file systems? ›

While Ext4 remains the default choice for many Linux distributions, other options like Btrfs, XFS, ZFS, and F2FS provide compelling alternatives with unique features and advantages. Ultimately, the choice of file system will depend on your specific use case and preferences.

What is the LS alternative to Linux? ›

exa is an improved file lister with more features and better defaults. It uses colours to distinguish file types and metadata. It knows about symlinks, extended attributes, and Git. And it's small, fast, and just one single binary.

What are alternatives to Linux screen command? ›

byobu with/or tmux

I think byobu is a more friendly alternative. It uses tmux as backend, so you have friendly byobu shortcuts, and also tmux ones (by default Ctrl+a + ... , you can change it with F9 or byobu-config ). From its site (see also there the excellent screencast):

What is etc hosts equivalent in Linux? ›

The /etc/hosts file is a plain text file used in matching an FQDN with the server IP hosting a specific domain. It's useful if a DNS server is not available when a user wants to access a domain from their browser. When the DNS server cannot be reached, Linux uses the /etc/hosts file to resolve the domain name.

What is etc services in Linux? ›

The /etc/services file is used by applications to translate human readable service names into port numbers when connecting to a machine across a network. The file will typically include the service name, port/protocol, any aliases, and comments.

What is the etc function in Linux? ›

Purpose. The /etc hierarchy contains configuration files. A "configuration file" is a local file used to control the operation of a program; it must be static and cannot be an executable binary. It is recommended that files be stored in subdirectories of /etc rather than directly in /etc .

What is var and etc in Linux? ›

The /etc/ directory is a common location to put configuration files. (But not the ONLY one by any means.) The /var directory is the location for "variable" things like logs, running process ID pointer files, spool directories, and other things important for running services.

Top Articles
What's A Good Credit Score To Buy A New Or Used Car?
decillionaire - Wiktionary, the free dictionary
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
Latest Posts
Article information

Author: Neely Ledner

Last Updated:

Views: 6284

Rating: 4.1 / 5 (42 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Neely Ledner

Birthday: 1998-06-09

Address: 443 Barrows Terrace, New Jodyberg, CO 57462-5329

Phone: +2433516856029

Job: Central Legal Facilitator

Hobby: Backpacking, Jogging, Magic, Driving, Macrame, Embroidery, Foraging

Introduction: My name is Neely Ledner, I am a bright, determined, beautiful, adventurous, adventurous, spotless, calm person who loves writing and wants to share my knowledge and understanding with you.