{"id":398917,"date":"2022-01-25T16:00:31","date_gmt":"2022-01-25T13:00:31","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-use-the-findmnt-command-on-linux\/"},"modified":"2022-01-25T16:00:31","modified_gmt":"2022-01-25T13:00:31","slug":"how-to-use-the-findmnt-command-on-linux","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-findmnt-command-on-linux\/","title":{"rendered":"#How to Use the findmnt Command on Linux"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a284bf268a56\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a284bf268a56\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-findmnt-command-on-linux\/#Mount_Points\" >Mount Points<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-findmnt-command-on-linux\/#The_findmnt_Command\" >The findmnt Command<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-findmnt-command-on-linux\/#Selecting_Specific_File_System_Types\" >Selecting Specific File System Types<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-findmnt-command-on-linux\/#Choosing_the_Data_Source\" >Choosing the Data Source<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-findmnt-command-on-linux\/#Selecting_by_Mount_Point\" >Selecting by Mount Point<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-findmnt-command-on-linux\/#Using_Polling_Mode_in_findmnt\" >Using Polling Mode in findmnt<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-the-findmnt-command-on-linux\/#A_Simple_Way_To_Avoid_Foul_Ups\" >A Simple Way To Avoid Foul Ups<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#How to Use the findmnt Command on Linux&#8221;<\/strong><\/p>\n<div>\n<figure style=\"width: 1200px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage  wp-image-775033 size-full\" data-pagespeed-lazy-srcset=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/shutterstock_1874749972.png?width=398&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 400w, https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/shutterstock_1874749972.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 1200w\" sizes=\"auto, 400w, 1200w\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/shutterstock_1874749972.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Illustration of a document management system floating over an open laptop \" width=\"1200\" height=\"675\" data-crediturl=\"https:\/\/www.shutterstock.com\/image-photo\/document-management-system-dms-being-setup-1874749972\" data-credittext=\"NicoElNino\/Shutterstock.com\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><figcaption class=\"wp-caption-text\"><span class=\"type:primaryImage imagecredit\"><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.shutterstock.com\/image-photo\/document-management-system-dms-being-setup-1874749972\">NicoElNino\/Shutterstock.com<\/a><\/span><\/figcaption><\/figure>\n<p>Discover everything about your file system mount points with the Linux <code>findmnt<\/code> command. It\u2019s an all-in-one tool with a very easy syntax. We show you how to use it.<\/p>\n<h2 id=\"mount-points\"><span class=\"ez-toc-section\" id=\"Mount_Points\"><\/span>Mount Points<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The Linux file system is a large tree. Depending on the choices you made when you installed Linux, different hard drives inside your computer may have different file systems on them. If you use <code>snap<\/code> packages you\u2019ll have <code>squashfs<\/code> pseudo-file systems in your system too. Devices like <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.lifesavvy.com\/reviews\/the-best-usb-flash-drives-to-save-your-files\/\">USB memory sticks<\/a> will have assorted file systems on them, especially if you also use them on Windows computers.<\/p>\n<p>Regardless of the file system type, they all have to be grafted onto the file system tree in a process called\u00a0<em>mounting<\/em>. Mounting is a crucial step in obtaining a working system. We tend to think of mounting a device like a hard drive, but actually what is being mounted is the file system on that device. And without access to all these various file systems, your computer might not even boot, or you won\u2019t be able to access <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>lications or data.<\/p>\n<p>File systems are mounted on mount points. These are just empty directories. Once the file system is mounted, entering that directory places you in that file system. That gives great flexibility. The root of the file system tree must be mounted on \u201c<code>\/<\/code>\u201c, but you can mount other file systems where ever it makes the most sense in your particular circumstances.<\/p>\n<p>That flexibility does mean it can be hard to keep track of all the different mount points, especially ones that have been created automatically and were created without your involvement.\u00a0Linux provides a variety of command-line tools to let you review the configuration and state of your mount points. Out of them all,\u00a0<code>findmnt<\/code> is the easiest to use and has some tricks all its own.<\/p>\n<h2 id=\"the-findmnt-command\"><span class=\"ez-toc-section\" id=\"The_findmnt_Command\"><\/span>The findmnt Command<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The <code>findmnt<\/code> command was already installed on the Ubuntu, Manjaro, and Fedora builds we checked. If it isn\u2019t installed on your Linux computer you\u2019ll be able to easily find it using the package manager for your distribution.<\/p>\n<p>The command-line tool you use to mount file systems is called <code>mount<\/code>. File systems that are mounted at boot time are defined in the \u201c\/etc\/fstab\u201d file. You can use the <code>mount<\/code> command to get a dump of all the mount points configured in your \u201c\/etc\/fstab\u201d file.<\/p>\n<pre>mount<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774925\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/1-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"The mount command\" width=\"644\" height=\"55\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The output is detailed, but formatted in a dense wall of text.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774926\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/2-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"The raw dump of information from the mount command\" width=\"644\" height=\"333\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>With a bit of effort, you can pick your way through it, or pipe it through utilities such as <code>grep<\/code> to winkle out the bits you\u2019re interested in. The output from <code>findmnt<\/code> is much more accessible.<\/p>\n<pre>findmnt<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774932\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/3-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"The findmnt command \" width=\"644\" height=\"55\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>By contrast, the default output from <code>findmnt<\/code> is tabulated and contains a tree showing the hierarchy of the mount points.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774933\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/4-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"The tabulated output from findmnt\" width=\"644\" height=\"332\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The columns are:<\/p>\n<ul>\n<li><strong>Target<\/strong>: The location of the mount point in the file system<\/li>\n<li><strong>Source<\/strong>: The source device that contains the file system. Note that this might be a pseudo-device like a loopback device.<\/li>\n<li><strong>Fstype<\/strong>: The file system type.<\/li>\n<li><strong>Options<\/strong>: The options that were used with the command line mount command or in the \u201c\/etc\/fstab\u201d file to mount the file system.<\/li>\n<\/ul>\n<p>To see the output without the tree, use the <code>-l<\/code> (list) option.<\/p>\n<pre>findmnt -l<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774934\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/5-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"The findmnt command with the -l list option\" width=\"644\" height=\"55\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The columns are the same, but the mount point hierarchy is not represented as an indented tree.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774935\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/6-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"The findmnt plain listing output\" width=\"644\" height=\"332\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"selecting-specific-file-system-types\"><span class=\"ez-toc-section\" id=\"Selecting_Specific_File_System_Types\"><\/span>Selecting Specific File System Types<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The -t (type) option causes <code>findmnt<\/code> to restrict its report to only include the file system type you request. For example, to only see <code>ext4<\/code> file systems, you\u2019d use:<\/p>\n<pre>findmnt -t exta<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774936\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/7-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Inspecting ext4 file system mount points with findmnt\" width=\"644\" height=\"110\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>To see only <code>squashfs<\/code> file systems you\u2019d type:<\/p>\n<pre>findmnt -t squashfs<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774940\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/8-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Inspecting squashfs file system mount points with findmnt\" width=\"644\" height=\"365\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>To invert the selection so that you see everything else apart from the type you\u2019ve specified on the command line, use the <code>-i<\/code> (invert) option.<\/p>\n<pre>findmnt -t squashfs -i<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774943\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/9-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Excluding squashfs mount points with the -i invert option\" width=\"644\" height=\"55\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The <code>squashfs<\/code> file systems are not reported on.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774946\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/10-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Output from findmnt with squashfs file systems ignored\" width=\"644\" height=\"380\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The <code>-t<\/code> (type) option lets you use a comma-separated list of file system types. Don\u2019t put spaces between them, as whitespace isn\u2019t allowed between the file system types.<\/p>\n<pre>findmnt -t squashfs,proc,ext4<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774947\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/11-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Selecting three types of file system mount point at once with findmnt\" width=\"644\" height=\"380\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"choosing-the-data-source\"><span class=\"ez-toc-section\" id=\"Choosing_the_Data_Source\"><\/span>Choosing the Data Source<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>By default, <code>findmnt<\/code> gets its information from \u201c\/etc\/fstab\u201d, \u201c\/etc\/mtab\u201d, and \u201c\/proc\/self\/mountinfo\u201d.<\/p>\n<ul>\n<li><strong>\/etc\/fstab<\/strong>: This is the file that holds the details of configured mounts. These are acted upon at boot time.<\/li>\n<li><strong>\/etc\/mtab<\/strong>: This file holds the details of the currently mounted mounts.<\/li>\n<li><strong>\/proc\/self\/mountinfo<\/strong>: This queries the kernel for the most authoritative account of your system\u2019s mounts.<\/li>\n<\/ul>\n<p>You can tell <code>findmnt<\/code> to use one particular source if you wish. The options are:<\/p>\n<ul>\n<li><strong>\u2014fstab or -s<\/strong>: Look in \u201c\/etc\/fstab\u201d only.<\/li>\n<li><strong>\u2014mtab or -m<\/strong>: Look in \u201c\/etc\/mtab\u201d only.<\/li>\n<li><strong>\u2014kernel or -k<\/strong>: Look in \u201c\/proc\/self\/mountinfo\u201d only.<\/li>\n<\/ul>\n<p>We can see the difference this can make if we look for <code>vfat<\/code> file systems. First, we\u2019ll use the <code>-s<\/code> (fstab) option. This finds one <code>vfat<\/code> file system, mounted at \u201c\/boot\/efi.\u201d<\/p>\n<pre>findmnt -s -t vfat<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774954\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/13-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using findmnt to search \/etc\/fstab for vfat file system mounts\" width=\"644\" height=\"110\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>We\u2019ll try again, and this time we\u2019ll use the <code>-k<\/code> (kernel) option.<\/p>\n<pre>findmnt -k -t vfat<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774960\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/14-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using findmnt to search \/proc\/self\/mount for vfat file system mounts\" width=\"644\" height=\"149\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>This reports on four entries. One is the same <code>vfat<\/code> file system that the <code>-s<\/code> option found. The other three are\u00a0<em>ad-hoc<\/em>\u00a0mounts that have occurred because two USB memory sticks have been plugged in. The <code>-s<\/code> option didn\u2019t find them because they\u2019re not configured in the \u201c\/etc\/fstab\u201d file.<\/p>\n<p>One USB memory stick is connected as \u201c\/dev\/sdc1\u201d, which is the first partition on device <code>sdc<\/code>. The other memory stick has two partitions on it and these have been mounted as \u201c\/dev\/sdb1\u201d and \u201c\/dev\/sdb2.\u201d<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>What Is the Linux fstab File, and How Does It Work?<\/em><\/strong><\/p>\n<h2 id=\"selecting-by-mount-point\"><span class=\"ez-toc-section\" id=\"Selecting_by_Mount_Point\"><\/span>Selecting by Mount Point<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you know the mount point you can pass that to <code>findmnt<\/code> to find out the settings and other details.<\/p>\n<pre>findmnt \/<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/social-mediaa\/\" data-internallinksmanager029f6b8e52c=\"1\" title=\"Social Media\" target=\"_blank\" rel=\"noopener\">media<\/a>\/dave\/PINK<\/pre>\n<pre>findmnt \/media\/dave\/WHITEUSB<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774965\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/12-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Inspecting mount points by name with findmnt\" width=\"644\" height=\"149\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>We can see these two USB memory sticks have <code>vfat<\/code> file systems, and they\u2019ve been mounted as \u201c\/dev\/sdb2\u201d and \u201c\/dev\/sdc1.\u201d<\/p>\n<h2 id=\"polling-mode\"><span class=\"ez-toc-section\" id=\"Using_Polling_Mode_in_findmnt\"><\/span>Using Polling Mode in findmnt<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Possibly the coolest feature of <code>findmnt<\/code> is its polling feature. Writing images to USB devices is something that you can find yourself doing periodically. Identifying the correct drive is critical of course. You don\u2019t want to overwrite the wrong device. <code>findmnt<\/code> makes it easy to see which device a removable drive is connected as.<\/p>\n<p>There are two ways to do this. You can ask <code>findmnt<\/code> to monitor new mounts for a period of time, expressed in milliseconds. Any mounts that happen during that period are reported on. This uses the <code>--timeout<\/code> option.<\/p>\n<p>The second way tells <code>findmnt<\/code> to wait until it has detected a new mount. This uses the <code>--first-only<\/code> option. It will wait for as long as it takes for a new mount to occur, but it\u2019ll only report on the first mount that takes place. The <code>--timeout<\/code> option will report on all new mounts that occur during the specified polling period.<\/p>\n<p>This command tells <code>findmnt<\/code> to monitor new mounts for 30 seconds.<\/p>\n<pre>findmnt -p --timeout 30000<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-774966 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/15-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Making findmnt monitor for new mount points for 30 seconds\" width=\"644\" height=\"83\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>A single USB memory stick has been plugged in during that period, reported on, and <code>findmnt<\/code> is continuing to monitor for the rest of the 30 seconds.<\/p>\n<p>This command tells <code>findmnt<\/code> to monitor for new mounts until it sees one new mount point created.<\/p>\n<pre>findmnt -p --first-only<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-774968\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/16-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"waiting for the next new mount point with findmnt\" width=\"644\" height=\"96\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>When a new device is plugged in, it reports on a new mount point, then exits to the command prompt.<\/p>\n<h2 id=\"wrap-up\"><span class=\"ez-toc-section\" id=\"A_Simple_Way_To_Avoid_Foul_Ups\"><\/span>A Simple Way To Avoid Foul Ups<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Overwriting the wrong device is always a disaster. The <code>findmnt<\/code> command makes it easy to positively identify a device you\u2019ve just plugged in, making the overwriting process much safer.<\/p>\n<p>Easy and safer is another way of saying win win.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>How To Overwrite Free Space Securely in Windows<\/em><\/strong><\/p>\n<\/div>\n<p><script>\n setTimeout(function(){\n  !function(f,b,e,v,n,t,s)\n  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n  n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n  n.queue=[];t=b.createElement(e);t.async=!0;\n  t.src=v;s=b.getElementsByTagName(e)[0];\n  s.parentNode.insertBefore(t,s) } (window, document,'script',\n  'https:\/\/connect.facebook.net\/en_US\/fbevents.js');\n   fbq('init', '335401813750447');\n   fbq('track', 'PageView');\n  },3000);\n<\/script><\/p>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.howtogeek.com\/774913\/how-to-use-the-findmnt-command-on-linux\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#How to Use the findmnt Command on Linux&#8221; NicoElNino\/Shutterstock.com Discover everything about your file system mount points with the Linux findmnt command. It\u2019s an all-in-one tool with a very easy syntax. We show you how to use it. Mount Points The Linux file system is a large tree. Depending on the choices you made when&#8230;<\/p>\n","protected":false},"author":1,"featured_media":398918,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/shutterstock_1874749972.png?height=200p&trim=2,2,2,2","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-398917","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/398917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=398917"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/398917\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/398918"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=398917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=398917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=398917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}