🛠️ Essential CLI Tools You Should Know - Part 1: dust
& lsd
Link to heading
The command line is an unstoppable force when used correctly. With the right tools, you can work faster, navigate smarter, and automate efficiently.
In this post, I’ll introduce two modern replacements for old Unix commands that massively improve disk usage analysis and file listing:
-
dust
→ A betterdu
-
lsd
→ A betterls
🌟 dust
– A Smarter Alternative to du
Link to heading
Need to check disk usage but tired of manually parsing du -sh
output? dust
makes this fast, readable, and intuitive.
🔹 Why dust
?
Link to heading
✅ Human-readable output (sizes in MB/GB, no cryptic blocks) ✅ Graphical tree view 📊 ✅ Parallel execution – it’s much faster than du
✅ Ignores .gitignore
files (no clutter)
⚡ Quick Start Link to heading
📥 Install: Link to heading
-
Ubuntu/Debian:
cargo install du-dust
-
MacOS:
brew install dust
💡 Common Usage: Link to heading
dust # Show disk usage in current directory
dust -d 2 # Show 2 levels deep
dust -r # Reverse order (largest first)
🔥 Why use it? Instead of running du -sh * | sort -h
, dust
does it all in one go.
🌟 lsd
– The ls
You Always Wanted
Link to heading
The standard ls
is functional but ugly. lsd
(LS Deluxe) brings: ✅ Color-coded output 🎨 ✅ Tree view support 🌲 ✅ Icons for files & directories 📂 ✅ Git status indicators
⚡ Quick Start Link to heading
📥 Install: Link to heading
-
Ubuntu/Debian:
sudo apt install lsd
-
MacOS:
brew install lsd
💡 Common Usage: Link to heading
lsd # Beautiful, colorful `ls`
lsd -l # Detailed list view
lsd --tree # Show directory structure as a tree
🔥 Why use it? Instant visual improvements while keeping everything familiar.
✅ Final Thoughts Link to heading
Both dust
and lsd
are drop-in replacements for du
and ls
. They work out of the box, and you’ll never want to go back.
🔥 Pro Tip: Link to heading
Make them your default by adding these aliases to ~/.bashrc
or ~/.zshrc
:
alias du="dust"
alias ls="lsd"
Now every time you type ls
or du
, you get the superior versions. 🚀
💡 What’s Next? Link to heading
This is just the start of a CLI revolution! In the next post, I’ll introduce: 📂 zoxide
– A smarter way to cd
🗃️ ouch
– The easiest way to compress & extract files
What are your favorite CLI tools? Drop them in the comments! 👇
📢 Want more? Link to heading
🔗 Check out my full blog here: badran-elshenawy.netlify.app/posts
#CLI #Linux #Productivity #SysAdmin #DevOps #Automation