The findmnt command (part of the util-linux package) is used to list all mounted filesystems or search for a filesystem.

The findmnt command is able to search in /etc/fstab, /etc/fstab.d, /etc/mtab or /proc/self/mountinfo.

If a device or mountpoint is not given, all filesystems are shown.

Here are some quick commands you can use:

Display a list of currently mounted file systems:

findmnt

This 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.

Display the information as an ordinary list, using the -l flag instead of the default tree-like format:

findmnt -l

Display only file systems of a specific type using the -t command-line option followed by a file system type:

findmnt --fstab -t xfs findmnt --fstab -t ext4

Print all /etc/fstab filesystems and convert LABEL= and UUID= tags to the real device names by adding the – --evaluate flag:

findmnt --fstab --evaluate

Display only the mount point where the filesystem with label "/boot" or “/” is mounted:

findmnt -n --raw --evaluate --output=target LABEL=/boot

findmnt -n --raw --evaluate --output=target LABEL=/

Monitor mount, unmount, remount & move actions on a dir:

findmnt --poll --mountpoint /mnt/backup

Get more information during output:

findmnt --real --verbose

man or "info" for more.

Hjälpte svaret dig? 0 användare blev hjälpta av detta svar (0 Antal röster)