Clean mount lists in Linux

Default installations of Linux distributions now mount more filesystems, making it harder to understand the output of commands like df, lsblk, and mount. However, there are ways to make the output more readable by removing irrelevant devices. For example, in Ubuntu 22.04, the df command can exclude tmpfs with the option -x tmpfs. Similarly, lsblk can exclude loopback devices (snaps) with the option -e 7. The mount command doesn’t have a built-in exclude option, but you can use awk to filter the output based on the type column. Alternatively, you can use findmnt from util-linux as an alternative to df and mount with better filtering options.

https://dbohdan.com/clean-mount-lists

To top