In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to use the findmnt command under the Linux system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The Findmnt command is used to find the mounted file system. It is used to list installed devices, which can also be mounted or uninstalled when needed, as part of the util-linux package.
Install findmnt
The findmnt command comes from the util-linux package and 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 mounted in fstab.
The code is as follows:
$findmnt-s
Lists mounted file systems by file type.
The code is as follows:
$findmnt-t ext4
Output in df format
Findmnt can use the "- D" or "- df" options to create an output report in df format that is free 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 000-/ 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
Original output
If you prefer raw-style output, use the "- r" or "--raw" options.
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 through the source Devic
Find the file system through the source device and specify 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
Find through the mount point
Find the file system by mounting the directory, and specify that the directory includes / excludes 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
This is the end of the content of "how to use the findmnt command under the Linux system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.