Upgrade Your Linux Workflow: 10 Powerful CLI Replacements for cat, df, and top
This article introduces ten open‑source Linux command‑line tools—including bat, duf, tldr, htop, glances, exa, fd, ag, axel and pydf—explaining how to install them on various distributions, showcasing their key features and usage examples, and demonstrating how they can improve everyday system administration tasks.
Hello, I'm Jie Ge. In Linux we often use the
catcommand to concatenate files, but a newer tool called bat offers syntax highlighting, Git integration and automatic paging.
01 bat
Installation
Arch Linux
<code>pacman -S bat</code>Fedora
<code>dnf install bat</code>macOS
<code>brew install bat</code>On Ubuntu you can download the .deb package and install it:
<code>sudo apt-get install wget
wget https://github.com/sharkdp/bat/releases/download/v0.18.3/bat_0.18.3_amd64.deb
sudo dpkg -i bat_0.18.3_amd64.deb</code>The
batcommand works like
catbut adds many conveniences:
<code>bat > jiaoben1.sh # create a new file
bat jiaoben1.sh # view file content with syntax highlighting
bat jiaoben1.sh jiaoben2.sh # view multiple files
bat jiaoben1.sh jiaoben2.sh > test.txt # merge files</code>Use
-nto show line numbers,
--theme=Draculato change the colour scheme, and
--style=numbers,changesto customize the output.
02 duf
dufis a Go‑written, cross‑platform disk‑usage viewer that presents information in a friendly table.
Ubuntu installation
<code>sudo apt install gdebi
wget https://github.com/muesli/duf/releases/download/v0.5.0/duf_0.5.0_linux_amd64.deb
sudo gdebi duf_0.5.0_linux_amd64.deb</code>macOS
<code>/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
brew install duf</code>Windows
<code>choco install duf
scoop install duf</code>Typical usage:
<code>duf # show all devices
duf --only local # show only local devices
duf --sort size # sort by size</code>03 tldr
tldr(Too Long; Didn't Read) provides concise examples for common commands, simplifying the output of
man.
Installation on Ubuntu:
<code>sudo apt-get install nodejs
sudo apt-get install npm
sudo npm install -g tldr
tldr --update</code>Usage: simply run
tldr <command>to see short examples.
04 htop
htopis an interactive, colour‑enhanced replacement for
top, written in C and available on most platforms.
<code>apt install htop</code>It offers better visualisation, scrolling, sorting and the ability to kill or renice processes directly.
05 glances
glancesis a Python‑based, cross‑platform monitoring tool that adapts its output to the terminal size and can run in client/server mode.
It displays CPU, memory, network, disk usage, sensor data and the most resource‑hungry processes.
06 exa
exais a modern replacement for
lswith colour‑coded output, Git integration and many view options (grid, tree, long, etc.).
<code>apt install exa</code>Common options:
-1– one entry per line
-G– grid view (default)
-l– long view with details
-R– recurse into directories
-T– tree view
--style=numbers,changes– show line numbers and Git changes
07 fd
fdis a fast, user‑friendly alternative to
find, with sensible defaults and colour output.
<code>sudo apt install fd-find</code>On Ubuntu the binary is named
fdfind; you can create an alias:
<code>alias fd=fdfind</code>Example searches:
<code>fd *.md # find markdown files
fd -H . # include hidden files</code>08 ag
ag(the Silver Searcher) and
ackare faster, colour‑enhanced alternatives to
grepfor recursive text searches.
<code>apt-get install silversearcher-ag
apt install ack</code>Common options:
-g– list files matching a pattern
-i– case‑insensitive
-A,
-B,
-C– show context lines
-w– match whole words
09 axel
axelis a multi‑threaded command‑line downloader that can replace
wgetor
curl.
<code>apt-get install axel</code>Key options:
-n– number of threads
-o– output directory
-s– max speed
-q– quiet mode
Example:
<code># axel -n 10 -o /tmp/ http://mirrors.163.com/ubuntu/ls-lR.gz</code>10 pydf
pydfis a Python‑based, more compact replacement for
dfthat shows disk usage with a cleaner layout.
<code>apt install pydf</code>References
bat – https://github.com/sharkdp/bat
duf – https://github.com/muesli/duf
tldr – https://github.com/tldr-pages/tldr
htop – https://github.com/htop-dev/htop
glances – https://github.com/nicolargo/glances
exa – https://github.com/ogham/exa
fd – https://github.com/sharkdp/fd/
Efficient Ops
This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.