Linux How-To

findmnt – Exhibits At the moment Mounted File Programs in Linux

SEOClerks

The findmnt command is an easy command-line utility used to show a listing of at present mounted file methods or seek for a file system in /and many others/fstab, /and many others/mtab or /proc/self/mountinfo.

1. To show a listing of at present mounted file methods, run the next at a shell immediate.

# findmnt

It shows the goal mount level (TARGET), the supply system (SOURCE), file system sort (FSTYPE), and related mount choices (OPTIONS) for every filesystem, as proven within the following output.

TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda3 ext4 rw,relatime,errors=remo
├─/sys sysfs sysfs rw,nosuid,nodev,noexec,
│ ├─/sys/kernel/safety 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/gadgets 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/reminiscence 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 shows file methods in a tree-like format. To show the data as an abnormal checklist, use the -l choice as proven.

# findmnt -l

Pattern 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,dimension=3996916ok,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,dimension=805740ok,mode=755
/ /dev/sda3 ext4 rw,relatime,errors=remount-ro,information=ordered
/sys/kernel/safety securityfs securityfs rw,nosuid,nodev,noexec,relatime
/dev/shm tmpfs tmpfs rw,nosuid,nodev
/run/lock tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,dimension=5120ok
/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,identify=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/gadgets cgroup cgroup rw,nosuid,nodev,noexec,relatime,gadgets
/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/reminiscence cgroup cgroup rw,nosuid,nodev,noexec,relatime,reminiscence
/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

three. You can too select to show solely file methods of a selected sort utilizing the -t command-line choice adopted by a file system sort resembling XFS or EXT4.

# findmnt –fstab -t xfs
OR
# findmnt –fstab -t ext4

Pattern Output

TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda3 ext4 rw,relatime,errors=remount-ro,information=ordered
└─/media/tecmint/Data_Storage /dev/sda5 ext4 rw,nosuid,nodev,relatime,information=ordered

four. You can too discover a filesystem utilizing a mount level. For instance, the next command shows all /and many others/fstab filesystems, the place the mountpoint listing is /mnt/exterior/disk2.

 
# findmnt –fstab /mnt/exterior/disk2 #this prints bind mounts the place /mnt/exterior/disk2 is a supply
OR
# findmnt –fstab –target /mnt/exterior/disk2

5. To print all /and many others/fstab filesystems and convert LABEL= and UUID= tags to the true system names, add the – –evaluate change as proven.

# 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 show solely the mount level the place the filesystem with label “/boot” or “/” is mounted, use the next command.

# findmnt -n –raw –evaluate –output=goal LABEL=/boot
OR
# findmnt -n –raw –evaluate –output=goal LABEL=/

7. Findmnt additionally means that you can screens mount, unmount, remount and transfer actions on a listing, for instance on /mnt/check.

# findmnt –poll –mountpoint /mnt/check

eight. Final however not least, if you need extra info in its output, use the –verbose change.

# findmnt –real –verbose

For extra info, run man findmnt to learn its handbook entry web page.

Source link

Related Articles

Back to top button