{"id":111,"date":"2019-05-06T11:27:37","date_gmt":"2019-05-06T16:27:37","guid":{"rendered":"https:\/\/tech.my-netsol.com\/?p=111"},"modified":"2019-05-06T11:27:37","modified_gmt":"2019-05-06T16:27:37","slug":"7-ways-to-determine-the-file-system-type-in-linux-ext2-ext3-or-ext4","status":"publish","type":"post","link":"https:\/\/tech.my-netsol.com\/?p=111","title":{"rendered":"7 Ways to Determine the File System Type in Linux (Ext2, Ext3 or Ext4)"},"content":{"rendered":"\n<p>From TecMint.com &#8211; https:\/\/www.tecmint.com\/find-linux-filesystem-type\/<\/p>\n\n\n\n<p>A file system is the way in which files are named, stored, retrieved  as well as updated on a storage disk or partition; the way files are  organized on the disk. <\/p>\n\n\n\n<p>A file system is divided in two segments called: <strong>User Data<\/strong> and <strong>Metadata<\/strong> (file name, time it was created, modified time, it\u2019s size and location in the directory hierarchy etc).<\/p>\n\n\n\n<p>In this guide, we will explain seven ways to identify your Linux file\n system type such as Ext2, Ext3, Ext4, BtrFS, GlusterFS plus many more.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Using df Command<\/h3>\n\n\n\n<p><strong>df command<\/strong> reports file system disk space usage, to include the file system type on a particular disk partition, use the <code>-T<\/code> flag as below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ df -Th\nOR\n$ df -Th | grep \"^\/dev\"\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/Find-Filesystem-Type-Using-df-Command.png\"><img decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/Find-Filesystem-Type-Using-df-Command.png\" alt=\"df Command - Find Filesystem Type\" class=\"wp-image-24860\"\/><\/a><\/figure>\n\n\n\n<p>df Command \u2013 Find Filesystem Type<\/p>\n\n\n\n<figure><iframe allowfullscreen=\"true\" width=\"780\" height=\"90\"><\/iframe><\/figure>\n\n\n\n<p>For a comprehensive guide for <strong>df command<\/strong> usage go through our articles:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><a href=\"https:\/\/www.tecmint.com\/how-to-check-disk-space-in-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">12 Useful \u201cdf\u201d Commands to Check Disk Space in Linux<\/a><\/li><li><a href=\"https:\/\/www.tecmint.com\/pyd-command-to-check-disk-usage\/\" target=\"_blank\" rel=\"noreferrer noopener\">Pydf \u2013 An Alternative \u2018df\u2019 Command That Shows Disk Usage in Colours <\/a><\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">2. Using fsck Command<\/h3>\n\n\n\n<p><strong>fsck<\/strong> is used to check and optionally <a href=\"https:\/\/www.tecmint.com\/defragment-linux-system-partitions-and-directories\/\" target=\"_blank\" rel=\"noreferrer noopener\">repair Linux file systems<\/a>, it can also print the <a href=\"https:\/\/www.tecmint.com\/manage-file-types-and-set-system-time-in-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">file system type on specified disk partitions<\/a>.<\/p>\n\n\n\n<p>The flag <code>-N<\/code> disables checking of file system for errors, it just shows what would be done (but all we need is the file system type):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ fsck -N \/dev\/sda3\n$ fsck -N \/dev\/sdb1\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/fsck-Print-Linux-Filesystem-Type.png\"><img decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/fsck-Print-Linux-Filesystem-Type.png\" alt=\"fsck - Print Linux Filesystem Type\" class=\"wp-image-24861\"\/><\/a><\/figure>\n\n\n\n<p>fsck \u2013 Print Linux Filesystem Type<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Using lsblk Command<\/h3>\n\n\n\n<p><strong>lsblk<\/strong> displays block devices, when used with the <code>-f<\/code> option, it prints file system type on partitions as well:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ lsblk -f\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/lsblk-Shows-Linux-Filesystem-Type.png\"><img decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/lsblk-Shows-Linux-Filesystem-Type.png\" alt=\"lsblk - Shows Linux Filesystem Type\" class=\"wp-image-24862\"\/><\/a><\/figure>\n\n\n\n<p>lsblk \u2013 Shows Linux Filesystem Type<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Using mount Command<\/h3>\n\n\n\n<p><strong>mount<\/strong> command is used to <a href=\"https:\/\/www.tecmint.com\/sshfs-mount-remote-linux-filesystem-directory-using-ssh\/\" target=\"_blank\" rel=\"noreferrer noopener\">mount a file system in Linux<\/a>, it can also be used to <a href=\"https:\/\/www.tecmint.com\/extract-files-from-iso-files-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">mount an ISO image<\/a>, <a href=\"https:\/\/www.tecmint.com\/sshfs-mount-remote-linux-filesystem-directory-using-ssh\/\" target=\"_blank\" rel=\"noreferrer noopener\">mount remote Linux filesystem<\/a> and so much more.<\/p>\n\n\n\n<p>When run without any arguments, it prints <a href=\"https:\/\/www.tecmint.com\/linux-tools-to-monitor-disk-partition-usage\/\" target=\"_blank\" rel=\"noreferrer noopener\">info about disk partitions<\/a> including the file system type as below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ mount | grep \"^\/dev\"\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/Mount-Show-Filesystem-Type.png\"><img decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/Mount-Show-Filesystem-Type.png\" alt=\"Mount - Show Filesystem Type in Linux\" class=\"wp-image-24863\"\/><\/a><\/figure>\n\n\n\n<p>Mount \u2013 Show Filesystem Type in Linux<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. Using blkid Command<\/h3>\n\n\n\n<p><strong>blkid<\/strong> command is used to <a href=\"https:\/\/www.tecmint.com\/find-usb-device-name-in-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">find or print block device properties<\/a>, simply specify the disk partition as an argument like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ blkid \/dev\/sda3\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/blkid-Find-Filesystem-Type.png\"><img decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/blkid-Find-Filesystem-Type.png\" alt=\"blkid - Find Filesystem Type\" class=\"wp-image-24864\"\/><\/a><\/figure>\n\n\n\n<p>blkid \u2013 Find Filesystem Type<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6. Using file Command<\/h3>\n\n\n\n<p><strong>file<\/strong> command identifies file type, the <code>-s<\/code> flag enables reading of block or character files and <code>-L<\/code> enables following of symlinks:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo file -sL \/dev\/sda3\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/file-command-identifies-filesystem-type.png\"><img decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/file-command-identifies-filesystem-type.png\" alt=\"file - Identifies Filesystem Type\" class=\"wp-image-24865\"\/><\/a><\/figure>\n\n\n\n<p>file \u2013 Identifies Filesystem Type<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">7. Using fstab File<\/h3>\n\n\n\n<p>The <strong>\/etc\/fstab<\/strong> is a static file system info (such as mount point, file system type, mount options etc) file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ cat \/etc\/fstab\n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/fstab-shows-filesystem-types.png\"><img decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/fstab-shows-filesystem-types.png\" alt=\"Fstab - Shows Linux Filesystem Type\" class=\"wp-image-24866\"\/><\/a><\/figure>\n\n\n\n<p>Fstab \u2013 Shows Linux Filesystem Type<\/p>\n\n\n\n<p>That\u2019s it! In this guide, we explained seven ways to identify your \nLinux file system type. Do you know of any method not mentioned here? \nShare it with us in the comments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From TecMint.com &#8211; https:\/\/www.tecmint.com\/find-linux-filesystem-type\/ A file system is the way in which files are named, stored, retrieved as well as updated on a storage disk or partition; the way files are organized on the disk. A file system is divided in two segments called: User Data and Metadata (file name, time it was created, modified &#8230; <a title=\"7 Ways to Determine the File System Type in Linux (Ext2, Ext3 or Ext4)\" class=\"read-more\" href=\"https:\/\/tech.my-netsol.com\/?p=111\" aria-label=\"Read more about 7 Ways to Determine the File System Type in Linux (Ext2, Ext3 or Ext4)\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11,3],"tags":[],"class_list":["post-111","post","type-post","status-publish","format-standard","hentry","category-linux","category-os"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=\/wp\/v2\/posts\/111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=111"}],"version-history":[{"count":0,"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=\/wp\/v2\/posts\/111\/revisions"}],"wp:attachment":[{"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}