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 cat command to concatenate files, but a newer tool called bat offers syntax highlighting, Git integration and automatic paging.
01 bat
Installation
Arch Linux pacman -S bat Fedora dnf install bat macOS brew install bat On Ubuntu you can download the .deb package and install it:
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.debThe bat command works like cat but adds many conveniences:
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 filesUse -n to show line numbers, --theme=Dracula to change the colour scheme, and --style=numbers,changes to customize the output.
02 duf
dufis a Go‑written, cross‑platform disk‑usage viewer that presents information in a friendly table.
Ubuntu installation
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.debmacOS
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
brew install dufWindows
choco install duf
scoop install dufTypical usage:
duf # show all devices
duf --only local # show only local devices
duf --sort size # sort by size03 tldr
tldr(Too Long; Didn't Read) provides concise examples for common commands, simplifying the output of man.
Installation on Ubuntu:
sudo apt-get install nodejs
sudo apt-get install npm
sudo npm install -g tldr
tldr --updateUsage: 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. apt install htop 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 ls with colour‑coded output, Git integration and many view options (grid, tree, long, etc.). apt install exa 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. sudo apt install fd-find On Ubuntu the binary is named fdfind; you can create an alias: alias fd=fdfind Example searches:
fd *.md # find markdown files
fd -H . # include hidden files08 ag
ag(the Silver Searcher) and ack are faster, colour‑enhanced alternatives to grep for recursive text searches.
apt-get install silversearcher-ag
apt install ackCommon 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 wget or curl. apt-get install axel Key options: -n – number of threads -o – output directory -s – max speed -q – quiet mode
Example:
# axel -n 10 -o /tmp/ http://mirrors.163.com/ubuntu/ls-lR.gz10 pydf
pydfis a Python‑based, more compact replacement for df that shows disk usage with a cleaner layout.
apt install pydfReferences
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/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
