Site icon New Generation Enterprise Linux

Stop your loop devices from cluttering your mount output

Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)

Stop your loop devices from cluttering your mount output

🧩 The Challenge

You ever run mount or lsblk only to be blinded by a wall of twenty loop devices from your snap packages? It makes finding the actual physical partitions feel like searching for a needle in a haystack.

💡 The Fix

Just tell lsblk to filter out the loop devices entirely so you can focus on the hardware that actually matters. You’ll save yourself from scrolling endlessly every single time.

lsblk -e 7

⚙️ Why It Works

Passing -e to lsblk lets you provide a comma-separated list of major device numbers to exclude, and loop devices always clock in at 7. This cleans up the noise instantly without deleting anything you actually need.

🚀 Pro-Tip: Alias this to lsblk-clean in your .bashrc and stop squinting at your terminal.

Linux Tips & Tricks | © ngelinux.com | 11/4/2026

0 0 votes
Article Rating
Exit mobile version