Linux command
findmnt 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
List
findmnt
Example
findmnt /dev/sdb1
Example
findmnt /
Example
findmnt -t ext4,btrfs
Example
findmnt -D
Example
findmnt LABEL=BigStorage
Example
findmnt --json
Verify
findmnt -x --verbose
说明
findmnt lists all mounted filesystems or searches for a filesystem by device, mountpoint, label, or UUID. It can also verify the mount table and fstab configuration for errors.
参数
- -t, --types _list_
- Limit output to filesystems of specified types
- -o, --output _list_
- Define output columns
- -l, --list
- Use list output format
- -D, --df
- Imitate df output (show space usage)
- -x, --verify
- Verify mount table content
- -n, --noheadings
- Don't print column headings
- -r, --raw
- Use raw output format
- -J, --json
- Use JSON output format
- -f, --first-only
- Print the first matching filesystem only
- -s, --fstab
- Search in /etc/fstab instead of /proc/self/mountinfo
- -S, --source _spec_
- Explicitly define the mount source (device, LABEL=, UUID=, etc.)
- -M, --mountpoint _path_
- Explicitly define the mountpoint file or directory
- -T, --target _path_
- Find the filesystem for the given path (any file or directory)
- -p, --poll=_list_
- Monitor changes in /proc/self/mountinfo (actions: mount, umount, remount, move)
- -R, --submounts
- Print recursively all submounts for the selected filesystems
- LABEL=_label_
- Search by filesystem label
- UUID=_uuid_
- Search by filesystem UUID
FAQ
What is the findmnt command used for?
findmnt lists all mounted filesystems or searches for a filesystem by device, mountpoint, label, or UUID. It can also verify the mount table and fstab configuration for errors.
How do I run a basic findmnt example?
Run `findmnt` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -t, --types _list_ do in findmnt?
Limit output to filesystems of specified types