Managing mounted file systems in Linux is crucial for ensuring proper data accessibility, troubleshooting storage issues, and maintaining system integrity. Whether you are operating a VPS hosting, a dedicated server, or utilizing a cloud hosting solution, understanding how to check mounted files and partitions is essential for system administration. Additionally, businesses relying on managed hosting services benefit from streamlined storage management and performance optimization.
The mount command is the most common way to display all mounted file systems.
mountThis command lists all mounted partitions along with their mount points and filesystem types.
To filter the output for a specific device, use:
mount | grep /dev/sdXReplace /dev/sdX with the specific device name.
The df (Disk Free) command provides an overview of the mounted filesystems and their usage statistics.
df -hTo check only a specific filesystem, use:
df -h /mount/pointReplace /mount/point with the actual mount location.
The lsblk (List Block Devices) command provides a structured view of storage devices and their mount points.
lsblkFor more detailed information, including filesystem types, use:
lsblk -fThis command is particularly useful for identifying which partitions are mounted.
The findmnt command offers a tree-like view of mounted file systems, making it easier to interpret mount relationships.
findmntTo search for a specific mount point:
findmnt /mount/pointThe /proc/mounts file contains real-time information about all mounted file systems.
cat /proc/mountsFor better readability, use:
cat /proc/mounts | column -tTo get detailed information about block devices and their UUIDs, use the blkid command:
blkidThis is helpful for identifying mounted filesystems and their unique identifiers.
To list all mounted filesystems along with their types:
df -T
/etc/fstabIn Linux, the /etc/fstab file contains configuration entries that determine how and where disk partitions, network shares, and other volumes are mounted at boot time. It’s an essential file for managing persistent mounts.
To view its contents, use:
A typical /etc/fstab entry looks like this:
Explanation of fields:
Device – Can be a UUID, label, or device path (/dev/sdX1)
Mount point – Where the filesystem is attached (e.g., /mnt/data)
Filesystem type – Such as ext4, xfs, ntfs, nfs
Options – Mount options like defaults, noatime, ro, etc.
Dump – Used by the dump backup utility (usually 0)
Pass – Determines the order of filesystem checks at boot (0, 1, or 2)
Make sure each entry is correct to avoid boot errors. You can test a new fstab entry without rebooting by running:
This command attempts to mount all filesystems defined in /etc/fstab and will return an error if any line is invalid — making it a safe way to validate changes.
Monitoring mounted file systems in Linux is an essential skill for system administrators. Using commands like mount, df, lsblk, and findmnt, you can easily check and manage your file systems on a VPS hosting solution or a dedicated server. Proper monitoring helps in ensuring optimal system performance and troubleshooting storage issues effectively.