Linux system under findmnt command using full solution

Source: Internet
Author: User

The FINDMNT command is used to find the mounted file system. It is used to list installation devices and can be mounted or unloaded when needed, which is part of the Util-linux package.

Install Findmnt
The FINDMNT command comes from the Util-linux software package, which is installed by default in most distributions, such as Ubuntu,fedora,debian

The code is as follows:
$ aptitude Search Util-linux
I util-linux-miscellaneous system utilities
$ yum Info util-linux

Basic use

The code is as follows:
$ findmnt

Output in list format.

The code is as follows:
$ findmnt-l


Lists the file systems that are mounted in fstab.

The code is as follows:
$ findmnt-s

Lists the mounted file systems by file type.

The code is as follows:
$ findmnt-t Ext4


DF Format Output
Findmnt can use the "-D" or "-df" option to create an output in DF format that reports idle and used disk space.

The code is as follows:
$ findmnt-d
SOURCE fstype SIZE USED avail use% TARGET
Devtmpfs Devtmpfs 994.2M 0 994.2M 0%/dev
SELINUXFS SELINUXFS 0 0 0-/sys/fs/selinux
Tmpfs tmpfs 1001.5M 68K 1001.4M 0%/DEV/SHM
Tmpfs tmpfs 1001.5M 724K 1000.8M 0%/run
Tmpfs tmpfs 1001.5M 0 1001.5M 0%/sys/fs/cgroup
/dev/mapper/fedora-root ext4 6.5G 5.3G 811.6M 82%/
Tmpfs tmpfs 1001.5M 60K 1001.5M 0%/tmp
/DEV/SDA1 ext4 476.2M 107.7M 339.6M 23%/boot
Raw output
If you prefer the original style output, use the "-R" or "--raw" option.

The code is as follows:
$ findmnt--raw
TARGET SOURCE Fstype OPTIONS
/sys Sysfs Sysfs Rw,nosuid,nodev,noexec,relatime
/proc proc proc Rw,nosuid,nodev,noexec,relatime
/dev Udev Devtmpfs rw,relatime,size=4069060k,nr_inodes=1017265,mode=755
/dev/pts devpts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
/run Tmpfs Tmpfs rw,nosuid,noexec,relatime,size=816716k,mode=755
//dev/disk/by-uuid/6fa5a72a-ba26-4588-a103-74bb6b33a763 Ext4 rw,relatime,errors=remount-ro,data=ordered
/sys/fs/cgroup Tmpfs rw,relatime,size=4k,mode=755
/sys/fs/fuse/connections Fusectl Rw,relatime
/sys/kernel/debug Debugfs Rw,relatime
/sys/kernel/security SECURITYFS Rw,relatime
/run/lock Tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k
/run/shm Tmpfs Rw,nosuid,nodev,relatime
/run/user Tmpfs rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755
/sys/fs/pstore Pstore Rw,relatime
/media/13f35f59-f023-4d98-b06f-9dfaebefd6c1/dev/sda8 Ext4 Rw,nosuid,nodev,relatime,errors=remount-ro,data= Ordered
/media/4668484a68483b47/dev/sda5 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096
/proc/sys/fs/binfmt_misc Binfmt_misc Binfmt_misc Rw,nosuid,nodev,noexec,relatime
/sys/fs/cgroup/systemd systemd Cgroup Rw,nosuid,nodev,noexec,relatime,name=systemd
/run/user/1000/gvfs Gvfsd-fuse Fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000

Find by Source device
Locate the file system through the source device, specifying that the device path includes/does not include the "-S" option.

The code is as follows:
$ findmnt-s/dev/sda1
TARGET SOURCE Fstype OPTIONS
/BOOT/DEV/SDA1 Ext4 rw,relatime,seclabel,data=ordered
Looking through mount points
To locate the file system by mounting the directory, specify that the directory includes/does not include the "-t/--target" option.

The code is as follows:
$ findmnt-t/
TARGET SOURCE Fstype OPTIONS
//dev/mapper/fedora-root Ext4 rw,relatime,seclabel,data=ordered
$ findmnt-t/media/4668484a68483b47
TARGET SOURCE Fstype OPTIONS
/media/4668484a68483b47/dev/sda5 fuseblk rw,nosuid,nodev,relatime,user_id=0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.