The findmnt command is a simple command-line utility used to display a list of currently mounted file systems or search for a file system in /etc/fstab, /etc/mtab or /proc/self/mountinfo.
1. To display a list of currently mounted file systems, run the following at a shell prompt.
# findmnt
It displays the target mount point (TARGET), the source device (SOURCE), file system type (FSTYPE), and relevant mount options (OPTIONS) for each filesystem, as shown in the following output.
TARGET SOURCE FSTYPE OPTIONS / /dev/sda3 ext4 rw,relatime,errors=remo ├─/sys sysfs sysfs rw,nosuid,nodev,noexec, │ ├─/sys/kernel/security securityfs securit rw,nosuid,nodev,noexec, │ ├─/sys/fs/cgroup tmpfs tmpfs ro,nosuid,nodev,noexec, │ │ ├─/sys/fs/cgroup/unified cgroup cgroup2 rw,nosuid,nodev,noexec, │ │ ├─/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec, │ │ ├─/sys/fs/cgroup/perf_event cgroup cgroup rw,nosuid,nodev,noexec, │ │ ├─/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec, │ │ ├─/sys/fs/cgroup/hugetlb cgroup cgroup rw,nosuid,nodev,noexec, │ │ ├─/sys/fs/cgroup/rdma cgroup cgroup rw,nosuid,nodev,noexec, │ │ ├─/sys/fs/cgroup/cpu,cpuacct cgroup cgroup rw,nosuid,nodev,noexec, │ │ ├─/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec, │ │ ├─/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec, │ │ ├─/sys/fs/cgroup/net_cls,net_prio cgroup cgroup rw,nosuid,nodev,noexec, │ │ ├─/sys/fs/cgroup/pids cgroup cgroup rw,nosuid,nodev,noexec, │ │ ├─/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec, │ │ └─/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec, │ ├─/sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec, │ ├─/sys/firmware/efi/efivars efivarfs efivarf rw,nosuid,nodev,noexec, │ ├─/sys/kernel/debug debugfs debugfs rw,relatime │ ├─/sys/kernel/config configfs configf rw,relatime │ └─/sys/fs/fuse/connections fusectl fusectl rw,relatime ├─/proc proc proc rw,nosuid,nodev,noexec, │ └─/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=24,pgrp=
2. By default, the findmnt command displays file systems in a tree-like format. To display the information as an ordinary list, use the -l option as shown.
# findmnt -l
Sample Output
TARGET SOURCE FSTYPE OPTIONS /sys sysfs sysfs rw,nosuid,nodev,noexec,relatime /proc proc proc rw,nosuid,nodev,noexec,relatime /dev udev devtmpfs rw,nosuid,relatime,size=3996916k,nr_inodes=999229,mode=755 /dev/pts devpts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 /run tmpfs tmpfs rw,nosuid,noexec,relatime,size=805740k,mode=755 / /dev/sda3 ext4 rw,relatime,errors=remount-ro,data=ordered /sys/kernel/security securityfs securityfs rw,nosuid,nodev,noexec,relatime /dev/shm tmpfs tmpfs rw,nosuid,nodev /run/lock tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k /sys/fs/cgroup tmpfs tmpfs ro,nosuid,nodev,noexec,mode=755 /sys/fs/cgroup/unified cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate /sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd /sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec,relatime /sys/firmware/efi/efivars efivarfs efivarfs rw,nosuid,nodev,noexec,relatime /sys/fs/cgroup/perf_event cgroup cgroup rw,nosuid,nodev,noexec,relatime,perf_event /sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices /sys/fs/cgroup/hugetlb cgroup cgroup rw,nosuid,nodev,noexec,relatime,hugetlb /sys/fs/cgroup/rdma cgroup cgroup rw,nosuid,nodev,noexec,relatime,rdma /sys/fs/cgroup/cpu,cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct /sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory /sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer /sys/fs/cgroup/net_cls,net_prio cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio /sys/fs/cgroup/pids cgroup cgroup rw,nosuid,nodev,noexec,relatime,pids
3. You can also choose to display only file systems of a specific type using the -t command-line option followed by a file system type such as XFS or EXT4.
# findmnt --fstab -t xfs OR # findmnt --fstab -t ext4
Sample Output
TARGET SOURCE FSTYPE OPTIONS / /dev/sda3 ext4 rw,relatime,errors=remount-ro,data=ordered └─/media/rootadminz/Data_Storage /dev/sda5 ext4 rw,nosuid,nodev,relatime,data=ordered
4. You can also find a filesystem using a mount point. For example, the following command displays all /etc/fstab filesystems, where the mountpoint directory is /mnt/external/disk2.
# findmnt --fstab /mnt/external/disk2 #this prints bind mounts where /mnt/external/disk2 is a source OR # findmnt --fstab --target /mnt/external/disk2
5. To print all /etc/fstab filesystems and convert LABEL= and UUID= tags to the real device names, add the – --evaluate switch as shown.
# findmnt --fstab --evaluate TARGET SOURCE FSTYPE OPTIONS / /dev/sda3 ext4 errors=remount-ro /boot/efi /dev/sda1 vfat umask=0077 none /dev/sda2 swap sw
6. To display only the mount point where the filesystem with label "/boot" or “/” is mounted, use the following command.
# findmnt -n --raw --evaluate --output=target LABEL=/boot OR # findmnt -n --raw --evaluate --output=target LABEL=/
7. Findmnt also allows you to monitors mount, unmount, remount and move actions on a directory, for example on /mnt/test.
# findmnt --poll --mountpoint /mnt/test
8. Last but not least, if you want more information in its output, use the --verbose switch.
# findmnt --real --verbose