Open-Source Linux Command Series • Command #73 • 30–40 minutes
A directory can exist even when the storage expected to be mounted there is absent. The findmnt command helps you distinguish the filesystem containing a path from a mount that exists at that exact location. This matters when checking container volumes, data disks and service storage.
Learning objectives
Read the active mount table; identify a filesystem by path; distinguish target and mountpoint matching; select stable output columns; interpret JSON and exit status. Review mount namespaces and namespace diagnostics.
Inspect the filesystem containing a path
The findmnt manual documents current mount information, configured filesystem tables and explicit column selection. This lesson uses read-only queries. The following command was executed with util-linux 2.41.5 inside a Linux container.
findmnt --target /proc --output TARGET,SOURCE,FSTYPE
TARGET SOURCE FSTYPE
/proc proc proc
The target is the mount location, the source describes its origin, and FSTYPE identifies the filesystem type. proc is a virtual filesystem, not a physical disk partition. A separate lsblk query answers a different question about block devices.

Containing filesystem versus exact mount point
findmnt --target /proc/self/status --output TARGET,FSTYPE --json
{
"filesystems": [
{
"target": "/proc",
"fstype": "proc"
}
]
}
A normal file can belong to a mounted filesystem without itself being a mount point. Test the exact mount-point path instead:
findmnt --mountpoint /proc --noheadings --output FSTYPE
findmnt --mountpoint /proc/self/status --noheadings --output FSTYPE
The first query returned proc and exit status 0; the second returned no matching row and status 1. Status 1 can also signal an error, so inspect diagnostics before inferring a missing mount. Use the exact mountpoint form when checking whether an expected volume is actually attached.
Script-friendly output
findmnt --types proc --output TARGET,FSTYPE
The test returned /proc and several subordinate mounts. The set of results varies with the environment. Specify output columns because defaults can change between util-linux versions. Use JSON where a program needs structured records rather than parsing indentation. See upstream util-linux documentation.
Active mounts and configured mounts
findmnt normally inspects the current process’s mount namespace. The –fstab option reads configured entries rather than proving they are active. A container may see a different mount table from the host. Compare the expected volume, source, filesystem type and options with the approved configuration; see df for capacity checks. Never change mount configuration or enter another namespace without authorization.
Exercises and answers
1. Which option finds the mount containing an ordinary file? 2. Which option tests the exact mount path? 3. Does an fstab entry prove an active mount? 4. Why select output columns explicitly?
Answers: 1. –target. 2. –mountpoint. 3. No. 4. To reduce reliance on version-dependent defaults. All examples are read-only; observed output is from the isolated test environment, not a production host.
Editor’s Note: We volunteer daily to ensure the credibility of the information on this platform is Verifiably True.
BitcoinVersus.Tech publishes technology and financial journalism for informational purposes and does not provide financial, investment, or legal advice.

Leave a Reply