Summarymount
Use findmnt --real instead of mount:
findmnt --real -t nosquashfs
df -x tmpfs -l
Explanation
mount
The mountfindmnt command doesn't support thisis the recommended way of listing mounts, but its manual page recommends usingaccording to the newer findmntmount for listing mountsmanual page:
The listing mode is maintained for backward compatibility only.
For more robust and customizable output use findmnt(8), especially in your scripts.
findmnt has a The --real option, which excludes virtual filesystems (like proc, devtmpfs, or cgroup).
Furthermore, you may want to exclude squashfs filesystems (if you use snap) to remove some clutter using -t nosquashfs. You can exclude more filesystems separated by comma, e.g. -t nosquashfs,nofuse.sshfs.
df
df
df -x tmpfs -l
df doesn't list most virtual systems by default (unless you pass the -a option), so the main thing you'll want to exclude is tmpfs filesystems (-x tmpfs), as well as perhaps non-local ones (-l). If your df shows squashfs filesystems (mine doesn't), you may have to pass -x tmpfs -x squashfs to exclude them.