8 Linux commands so good, they feel like cheating
While the Linux command set is great on its own, it seems that programmers can't stop reinventing it. Here are some of the best modern takes on classic Linux tools that fix some common annoyances with Unix-like systems. You might wonder how you ever got by before you knew about them like I did.
Search text quickly with fzf
To find files on Linux, you might use the ls or even the find command. While you can locate exact filenames and use wildcards to to generate lists of files to pass to a command, fzf , for "fuzzy find," lets you search output in real. The "fuzzy" part comes from how it will show the search string highlighted in the list of files. fzf is a full-screen terminal program. With the find command's notoriously abstruse syntax, fzf is a welcome replacement.
It's also useful as a replacement for grep. fzf is great for piping things into for searching.
To install it from Debian or Ubuntu:
To install it on Arch:
On Fedora and other Red Hat family distros:
Find info on commands quickly with tldr
Bobby Jack / How To Geek
If you ever read Linux manpages , it seems like you're drinking from a firehose of technical information. Linux programs have a lot of options, but it can be frustrating to read through these walls of text to find the one youneed. Fortunately, tldr can help.
For example:
tldr displays a summary of a command-line program's function with some common options. You'll likely find the one you want to use.
You can install it via pip, regardless of distro:
ack: Another grep replacement
ack is a tool that's meant to replace grep, the tool for searching through text . Like grep, it also has a funny name, but it's a serious tool. It's designed with programmers in mind and knows how to avoid irrelevant files in output. It takes Perl regular expressions and will highlight the matches in the search input, although most modern implementations of grep do the same thing. It can also use "proximate searches" to find matches that are close but not exact.
You can install ack via Debian or Ubuntu:
And in Arch:
And in Fedora:
mtr: It's both a ping and traceroute!
If you do any networking, you're likely familiar with running the ping command to see if your connection is up. You may also be familiar with traceroute or tracepath , a utility that lets you see the paths your packets are taking across the internet to the their destinations. mtr ("My Tracroute," formerly "Matt's Traceroute") is a command that lets you combine both into one program. Like ping, it sends out packets and listens for an answer from a remote server. Like traceroute, it traces the paths in real time.
You can install it on Debian and Ubuntu:
And on Arch:
And on Fedora
eza: Stylish file listing
eza is a program that aims to replace ls as the tool to list files on Linux. It seems superficially similar to ls but it has some features to make it more readable. It has color schemes that work with both light and dark terminals. The long mode, or -l, looks similar to ls, but all of the columns are colored.
eza is evailable on Debian and Ubuntu:
And in Arch:
It's not in the repositories for Fedora, but you can download a binary version from the website.
bat/batcat: A slick take on a basic Linux utility
bat is a utility that aims to replace the classic cat command . It works the same way: it concatenates standard input (keyboard input or from files) to the standard input (such as a terminal or a teletype in the olden days).
You can use it the same way that you would use cat, but on Ubuntu, the name of the utility has been renamed to "batcat" for some reason. Fortunately, you can use a shell alias if you want. This one should work in most Bourne-type shells, such as Bash or zsh:
You can drop this in your shell's startup files, such as the .bashrc or .zshrc.
You can obviously install it on Debian or Ubuntu:
And on Arch:
And on Fedora:
ripgrep: Easy searching through your directories
The name ripgrep should give you a clue as to what utility it's intended to replace . One key difference of ripgrep from grep is that it recursively searches subdirectories. I don't think it would actually replace grep for standard input and output, since it's designed to work with files and directories, but it's a more than welcome replacement for find.
Like grep, it searches for files using regular expressions, which let you specify matches down to the character. To search recursively for the term python in the current directory:
This will also search the subdirectories relative to the current directory.
To install it on Debian or Ubuntu:
And on Arch:
And on Fedora:
gping
While the ping tool is useful, gping offers a visual display of ping times in the terminal. It's pretty neat to watch. It's interesting how the time path of ping times shows a sinusoidal pattern.
You can use it the same way as you would the regular ping command
To install it on Debian/Ubuntu:
And on Arch:
And on Fedora
It seems that as great as the standard Linux command set is, things can always be improved. As a Linux user, it pays to be open to new utilities. You never know when you might find one that makes working with files and networks easier.
