{"id":13264,"date":"2019-04-01T10:09:47","date_gmt":"2019-04-01T10:09:47","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=13264"},"modified":"2019-04-01T10:09:47","modified_gmt":"2019-04-01T10:09:47","slug":"7-ways-to-determine-the-file-system-type-in-linux-ext2-ext3-or-ext4","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/01\/7-ways-to-determine-the-file-system-type-in-linux-ext2-ext3-or-ext4\/","title":{"rendered":"7 Ways to Determine the File System Type in Linux (Ext2, Ext3 or Ext4)"},"content":{"rendered":"<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<p>A file system is divided in two segments called:\u00a0<strong>User Data<\/strong>\u00a0and\u00a0<strong>Metadata<\/strong>\u00a0(file name, time it was created, modified time, it\u2019s size and location in the directory hierarchy etc).<\/p>\n<p>In this guide, we will explain seven ways to identify your Linux file system type such as Ext2, Ext3, Ext4, BtrFS, GlusterFS plus many more.<\/p>\n<h3>1. Using df Command<\/h3>\n<p><strong>df command<\/strong>\u00a0reports file system disk space usage, to include the file system type on a particular disk partition, use the\u00a0<code>-T<\/code>\u00a0flag as below:<\/p>\n<pre>$ df -Th\r\nOR\r\n$ df -Th | grep \"^\/dev\"\r\n<\/pre>\n<div id=\"attachment_24860\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/Find-Filesystem-Type-Using-df-Command.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24860\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/Find-Filesystem-Type-Using-df-Command.png\" alt=\"df Command - Find Filesystem Type\" width=\"644\" height=\"297\" aria-describedby=\"caption-attachment-24860\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24860\" class=\"wp-caption-text\">df Command \u2013 Find Filesystem Type<\/p>\n<\/div>\n<p>For a comprehensive guide for\u00a0<strong>df command<\/strong>\u00a0usage go through our articles:<\/p>\n<ol>\n<li><a href=\"https:\/\/www.tecmint.com\/how-to-check-disk-space-in-linux\/\" target=\"_blank\" rel=\"noopener\">12 Useful \u201cdf\u201d Commands to Check Disk Space in Linux<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/pyd-command-to-check-disk-usage\/\" target=\"_blank\" rel=\"noopener\">Pydf \u2013 An Alternative \u2018df\u2019 Command That Shows Disk Usage in Colours<\/a><\/li>\n<\/ol>\n<h3>2. Using fsck Command<\/h3>\n<p><strong>fsck<\/strong>\u00a0is used to check and optionally\u00a0<a href=\"https:\/\/www.tecmint.com\/defragment-linux-system-partitions-and-directories\/\" target=\"_blank\" rel=\"noopener\">repair Linux file systems<\/a>, it can also print the\u00a0<a href=\"https:\/\/www.tecmint.com\/manage-file-types-and-set-system-time-in-linux\/\" target=\"_blank\" rel=\"noopener\">file system type on specified disk partitions<\/a>.<\/p>\n<p>The flag\u00a0<code>-N<\/code>\u00a0disables checking of file system for errors, it just shows what would be done (but all we need is the file system type):<\/p>\n<pre>$ fsck -N \/dev\/sda3\r\n$ fsck -N \/dev\/sdb1\r\n<\/pre>\n<div id=\"attachment_24861\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/fsck-Print-Linux-Filesystem-Type.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24861\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/fsck-Print-Linux-Filesystem-Type.png\" alt=\"fsck - Print Linux Filesystem Type\" width=\"523\" height=\"149\" aria-describedby=\"caption-attachment-24861\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24861\" class=\"wp-caption-text\">fsck \u2013 Print Linux Filesystem Type<\/p>\n<\/div>\n<h3>3. Using lsblk Command<\/h3>\n<p><strong>lsblk<\/strong>\u00a0displays block devices, when used with the\u00a0<code>-f<\/code>\u00a0option, it prints file system type on partitions as well:<\/p>\n<pre>$ lsblk -f\r\n<\/pre>\n<div id=\"attachment_24862\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/lsblk-Shows-Linux-Filesystem-Type.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24862\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/lsblk-Shows-Linux-Filesystem-Type.png\" alt=\"lsblk - Shows Linux Filesystem Type\" width=\"704\" height=\"276\" aria-describedby=\"caption-attachment-24862\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24862\" class=\"wp-caption-text\">lsblk \u2013 Shows Linux Filesystem Type<\/p>\n<\/div>\n<h3>4. Using mount Command<\/h3>\n<p><strong>mount<\/strong>\u00a0command is used to\u00a0<a href=\"https:\/\/www.tecmint.com\/sshfs-mount-remote-linux-filesystem-directory-using-ssh\/\" target=\"_blank\" rel=\"noopener\">mount a file system in Linux<\/a>, it can also be used to\u00a0<a href=\"https:\/\/www.tecmint.com\/extract-files-from-iso-files-linux\/\" target=\"_blank\" rel=\"noopener\">mount an ISO image<\/a>,\u00a0<a href=\"https:\/\/www.tecmint.com\/sshfs-mount-remote-linux-filesystem-directory-using-ssh\/\" target=\"_blank\" rel=\"noopener\">mount remote Linux filesystem<\/a>\u00a0and so much more.<\/p>\n<p>When run without any arguments, it prints\u00a0<a href=\"https:\/\/www.tecmint.com\/linux-tools-to-monitor-disk-partition-usage\/\" target=\"_blank\" rel=\"noopener\">info about disk partitions<\/a>\u00a0including the file system type as below:<\/p>\n<pre>$ mount | grep \"^\/dev\"\r\n<\/pre>\n<div id=\"attachment_24863\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/Mount-Show-Filesystem-Type.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24863\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/Mount-Show-Filesystem-Type.png\" alt=\"Mount - Show Filesystem Type in Linux\" width=\"660\" height=\"128\" aria-describedby=\"caption-attachment-24863\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24863\" class=\"wp-caption-text\">Mount \u2013 Show Filesystem Type in Linux<\/p>\n<\/div>\n<h3>5. Using blkid Command<\/h3>\n<p><strong>blkid<\/strong>\u00a0command is used to\u00a0<a href=\"https:\/\/www.tecmint.com\/find-usb-device-name-in-linux\/\" target=\"_blank\" rel=\"noopener\">find or print block device properties<\/a>, simply specify the disk partition as an argument like so:<\/p>\n<pre>$ blkid \/dev\/sda3\r\n<\/pre>\n<div id=\"attachment_24864\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/blkid-Find-Filesystem-Type.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24864\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/blkid-Find-Filesystem-Type.png\" alt=\"blkid - Find Filesystem Type\" width=\"586\" height=\"165\" aria-describedby=\"caption-attachment-24864\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24864\" class=\"wp-caption-text\">blkid \u2013 Find Filesystem Type<\/p>\n<\/div>\n<h3>6. Using file Command<\/h3>\n<p><strong>file<\/strong>\u00a0command identifies file type, the\u00a0<code>-s<\/code>\u00a0flag enables reading of block or character files and\u00a0<code>-L<\/code>\u00a0enables following of symlinks:<\/p>\n<pre>$ sudo file -sL \/dev\/sda3\r\n<\/pre>\n<div id=\"attachment_24865\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/file-command-identifies-filesystem-type.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24865\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/file-command-identifies-filesystem-type.png\" sizes=\"auto, (max-width: 812px) 100vw, 812px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/file-command-identifies-filesystem-type.png 812w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/file-command-identifies-filesystem-type-768x200.png 768w\" alt=\"file - Identifies Filesystem Type\" width=\"812\" height=\"211\" aria-describedby=\"caption-attachment-24865\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24865\" class=\"wp-caption-text\">file \u2013 Identifies Filesystem Type<\/p>\n<\/div>\n<h3>7. Using fstab File<\/h3>\n<p>The\u00a0<strong>\/etc\/fstab<\/strong>\u00a0is a static file system info (such as mount point, file system type, mount options etc) file:<\/p>\n<pre>$ cat \/etc\/fstab\r\n<\/pre>\n<div id=\"attachment_24866\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/fstab-shows-filesystem-types.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24866\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/fstab-shows-filesystem-types.png\" sizes=\"auto, (max-width: 790px) 100vw, 790px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/fstab-shows-filesystem-types.png 790w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/03\/fstab-shows-filesystem-types-768x251.png 768w\" alt=\"Fstab - Shows Linux Filesystem Type\" width=\"790\" height=\"258\" aria-describedby=\"caption-attachment-24866\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24866\" class=\"wp-caption-text\">Fstab \u2013 Shows Linux Filesystem Type<\/p>\n<\/div>\n<p>That\u2019s it! In this guide, we explained seven ways to identify your Linux file system type. Do you know of any method not mentioned here? Share it with us in the comments.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/find-linux-filesystem-type\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<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. A file system is divided in two segments called:\u00a0User Data\u00a0and\u00a0Metadata\u00a0(file name, time it was created, modified time, it\u2019s size and location in the directory &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/01\/7-ways-to-determine-the-file-system-type-in-linux-ext2-ext3-or-ext4\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;7 Ways to Determine the File System Type in Linux (Ext2, Ext3 or Ext4)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13264","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=13264"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13264\/revisions"}],"predecessor-version":[{"id":13265,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13264\/revisions\/13265"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=13264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=13264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=13264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}