As you may know, I am a huge proponent of the GNU Core Utilities. I believe the tools included are required learning for any new Linux admin. Although it offers important everyday commands such as touch, head, basename, tail and many more, it cannot provide a tool for everything. This is where moreutils comes in. It provides some additional utilities that every Linux Admin or DevOps Engineer could use. In this article we will show you how to install the moreutils package and give a brief description of it's packages.
How to Install the moreutils Package
The moreutils package is available on almost all Linux systems. It is even provided by default on a few. In the section below we will describe how to install it on your system.
Install moreutils on Fedora
Fedora (and other rpm based distros) usually have the moreutils package in their default repositories. You can simply use DNF to install it like so:
sudo dnf install moreutils
Install moreutils on Ubuntu, Debian, Mint, etc.
Ubuntu, Debian, and Mint offer it in their default repositories as well. Just update your repositories and install the package via apt-get, like so:
sudo apt-get update sudp apt-get install moreutils
Install moreutils on Red Hat or CentOS
Red Hat and CentOS do not provide the moreutils package by default. Furthermore, it is not available in their default repositories. Don't fret, it's a simple fix. Simply enable the EPEL (Extra Packages for Enterprise Linux) repository and then run the install. Here are the steps to install moreutils on Red Hat or CentOS.
sudo yum install epel-release sudo yum install moreutils
Utilities Included in moreutils
Below is a list of utilities included in the moreutils package. Some Linux distributions do not include all the utilities in their package. So you may or may not have all of the commands listed below.
- chronic: Runs a command quietly unless it fails (exits non-zero)
- combine: Combine lines from two files using boolean operations
- errno: Look up errno names and descriptions
- ifdata: Get network interface info without parsing ifconfig output
- ifne: (If Not Empty) Run a program if the standard input is not empty
- isutf8: Check if a file or standard input is utf-8
- lckdo: Execute a program with a lock held
- mispipe: Pipe two commands, returning the exit status of the first
- parallel: Run multiple jobs at once
- pee: Tee standard input to pipes
- sponge: Soak up standard input and write to a file
- ts: Add or convert timestamps for standard input
- vidir: Edit a directory in your text editor
- vipe: Insert a text editor into a pipe
- zrun: Automatically uncompress arguments to command
Leave a comment below if your package does not include all of the utilities above. Maybe we can find a workaround.
Resources and Further Reading
This site uses Akismet to reduce spam. Learn how your comment data is processed.