How to Check Filesystem Type in Linux

Last reviewed: by
How to Check Filesystem Type in Linux

A Linux filesystem type tells you how data is organized inside a mounted path, partition, logical volume, USB drive, ISO image, or filesystem image. Common types include ext4, xfs, btrfs, vfat, ntfs, tmpfs, squashfs, iso9660, and swap.

The best command depends on what you are checking:

  • For a mounted path, use findmnt or df -T.
  • For a disk, partition, LVM volume, or USB drive, use lsblk -f or blkid.
  • For an unmounted device or filesystem image, use blkid or file -s.
  • For persistent mount configuration, check /etc/fstab.
  • For the currently mounted kernel view, check /proc/mounts or use findmnt.

The examples below were tested on an Ubuntu 25.04 host. The system uses an ext4 root filesystem on LVM, an ext4 /boot partition, tmpfs for /tmp, and an ISO9660 VirtualBox Guest Additions image mounted under /media.

NOTE
For a quick answer, run findmnt -no SOURCE,FSTYPE,TARGET /path for a mounted path, or lsblk -f for block devices. Do not confuse LVM2_member, crypto_LUKS, or partition table entries with the actual filesystem mounted inside a logical volume or decrypted device.

Quick Command Summary

Task Command
Check filesystem type for / findmnt -no SOURCE,FSTYPE,TARGET /
List mounted filesystems with type and usage findmnt -D
Show disk usage with filesystem type df -Th
List block devices with FSTYPE lsblk -f
Read filesystem signature from a device blkid /dev/device
Find all ext4 filesystems blkid -t TYPE=ext4
Check an unmounted device or image file -s /dev/device
Show filesystem type for a path stat -f -c '%T %t %s %n' /path
Read udev filesystem properties udevadm info --query=property --name=/dev/device
Check persistent mount definitions cat /etc/fstab
Check kernel mount table cat /proc/mounts

Filesystem Type vs Partition or Container Type

Before running commands, separate these terms:

Term What it means Example
Filesystem type Format used to store files ext4, xfs, btrfs, vfat, iso9660
Pseudo filesystem Kernel-provided virtual filesystem proc, sysfs, tmpfs, cgroup2
Swap signature Swap area, not a normal file filesystem swap
Container or member type Device is part of another storage layer LVM2_member, crypto_LUKS, linux_raid_member
Partition table type Disk partitioning format gpt, dos

For example, if lsblk shows LVM2_member on /dev/sda3, that does not mean your root filesystem is LVM2_member. It means /dev/sda3 is an LVM physical volume. The mounted filesystem may be ext4 or xfs on the logical volume below it. For storage-layer background, see how LVM works in Linux and how to encrypt a disk partition with LUKS.

If you need to create a filesystem first, see create filesystem on a Linux partition or logical volume. For disk and interface identification, see list disks and check disk type in Linux.


1. Check Filesystem Type for a Mounted Path with findmnt

findmnt is usually the best command when you know the mount point or path. It reads mount information and can show the source device, filesystem type, target, and options.

Check the root filesystem:

bash
findmnt -no SOURCE,FSTYPE,TARGET /

Tested output:

text
/dev/mapper/ubuntu--vg-ubuntu--lv ext4 /

This tells us that / is mounted from /dev/mapper/ubuntu--vg-ubuntu--lv and the filesystem type is ext4.

List mounted filesystems and filter useful types:

bash
findmnt -D -t ext4,tmpfs,iso9660 | head -n 12

Tested output:

text
SOURCE                            FSTYPE    SIZE  USED  AVAIL USE% TARGET
tmpfs                             tmpfs   846.7M  2.6M 844.1M   0% /run
/dev/mapper/ubuntu--vg-ubuntu--lv ext4     42.1G 36.9G   3.3G  88% /
tmpfs                             tmpfs     4.1G     0   4.1G   0% /dev/shm
tmpfs                             tmpfs       5M    8K     5M   0% /run/lock
tmpfs                             tmpfs       1M     0     1M   0% /run/credentials/systemd-journald.service
tmpfs                             tmpfs       1M     0     1M   0% /run/credentials/systemd-resolved.service
tmpfs                             tmpfs     4.1G 35.9M   4.1G   1% /tmp
/dev/sda2                         ext4      1.9G  221M   1.6G  11% /boot
tmpfs                             tmpfs   846.7M  344K 846.4M   0% /run/user/1000
tmpfs[/snapd/ns]                  tmpfs   846.7M  2.6M 844.1M   0% /run/snapd/ns
/dev/sr0                          iso9660  50.7M 50.7M      0 100% /media/golinuxcloud/VBox_GAs_7.2.0

Use this method when your question is: what filesystem type is mounted here? For more mounting examples, see Linux mount command examples.


2. Check Filesystem Type and Disk Usage with df -T

df -T shows mounted filesystems with their type and disk usage. It is convenient when you want type, size, used space, and mount point together.

bash
df -Th / /tmp /home

Tested output:

text
Filesystem                        Type   Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv ext4    43G   37G  3.3G  92% /
tmpfs                             tmpfs  4.2G   36M  4.1G   1% /tmp
/dev/mapper/ubuntu--vg-ubuntu--lv ext4    43G   37G  3.3G  92% /

Here / and /home are on the same ext4 filesystem, while /tmp is a tmpfs filesystem. For disk-usage focused troubleshooting, see check disk space in Linux.


3. List Filesystem Types for Block Devices with lsblk

Use lsblk -f when you want to see disks, partitions, LVM members, logical volumes, filesystem type, UUID, labels, and mount points in one tree.

bash
lsblk -f -e 7

Tested output:

text
NAME                      FSTYPE      FSVER            LABEL          UUID                                   FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1
├─sda2                    ext4        1.0                             c254a326-948a-4ae2-993b-1659f4ddcf03      1.6G    11% /boot
└─sda3                    LVM2_member LVM2 001                        xLar7A-0CSb-mAmp-Y2sy-s6KG-FtEP-kIBAUL
  └─ubuntu--vg-ubuntu--lv ext4        1.0                             72457fae-1731-4c94-b5c1-ac4564f4311c      3.3G    88% /
sdb                       LVM2_member LVM2 001                        fqCkHE-uhfu-TAWI-mbbp-KdrD-qFDZ-3HE08V
└─ubuntu--vg-ubuntu--lv   ext4        1.0                             72457fae-1731-4c94-b5c1-ac4564f4311c      3.3G    88% /
sdc
sr0                       iso9660     Joliet Extension VBox_GAs_7.2.0 2025-08-13-20-48-09-62                       0   100% /media/golinuxcloud/VBox_GAs_7.2.0

-e 7 excludes loop devices, which keeps Snap loop mounts and other loop-backed images out of the output. If you are checking USB storage, lsblk -f is usually the first command to run. For USB-specific steps, see mount USB drive in Linux. For ISO-backed filesystems such as iso9660, see mount ISO image in Linux.


4. Read Filesystem Metadata with blkid

blkid reads block-device metadata and prints tokens such as UUID, LABEL, BLOCK_SIZE, and TYPE.

bash
blkid | head -n 10

Tested output:

text
/dev/mapper/ubuntu--vg-ubuntu--lv: UUID="72457fae-1731-4c94-b5c1-ac4564f4311c" BLOCK_SIZE="4096" TYPE="ext4"
/dev/loop1: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop8: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/sdb: UUID="fqCkHE-uhfu-TAWI-mbbp-KdrD-qFDZ-3HE08V" TYPE="LVM2_member"
/dev/loop15: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop6: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop13: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop4: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop11: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/sr0: BLOCK_SIZE="2048" UUID="2025-08-13-20-48-09-62" LABEL="VBox_GAs_7.2.0" TYPE="iso9660"

Find only ext4 filesystems:

bash
blkid -t TYPE=ext4

Tested output:

text
/dev/mapper/ubuntu--vg-ubuntu--lv: UUID="72457fae-1731-4c94-b5c1-ac4564f4311c" BLOCK_SIZE="4096" TYPE="ext4"
/dev/sda2: UUID="c254a326-948a-4ae2-993b-1659f4ddcf03" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="bfcb64d5-6457-48d8-8c67-8117f830a551"

Use blkid when your question is: what filesystem signature exists on this block device? It also works on some filesystem image files, as shown later.


5. Check an Unmounted Filesystem with file -s and blkid

You do not have to mount a device to identify its filesystem type. file -s and blkid can inspect filesystem signatures directly.

For a safe test, a temporary 64 MiB ext4 image was created and removed after validation:

bash
truncate -s 64M /tmp/glc-fstype.img
mkfs.ext4 -F -L GLC_TEST /tmp/glc-fstype.img
file -s /tmp/glc-fstype.img
blkid /tmp/glc-fstype.img
tune2fs -l /tmp/glc-fstype.img | awk -F: '/Filesystem volume name|Filesystem UUID|Filesystem magic number|Filesystem features|Block size/ {gsub(/^ +/,"",$2); print $1 ":" $2}'

Tested output:

text
/tmp/glc-fstype.img: Linux rev 1.0 ext4 filesystem data, UUID=6df32a27-cbcd-44ef-b084-43429a744fd5, volume name "GLC_TEST" (extents) (64bit) (large files) (huge files)
/tmp/glc-fstype.img: LABEL="GLC_TEST" UUID="6df32a27-cbcd-44ef-b084-43429a744fd5" BLOCK_SIZE="4096" TYPE="ext4"
Filesystem volume name:GLC_TEST
Filesystem UUID:6df32a27-cbcd-44ef-b084-43429a744fd5
Filesystem magic number:0xEF53
Filesystem features:has_journal ext_attr resize_inode dir_index orphan_file filetype extent 64bit flex_bg metadata_csum_seed sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Block size:4096

This is useful for forensic checks, filesystem images, unmounted partitions, and situations where mounting the device would be unsafe.


6. Check Filesystem Type for a Path with stat

stat -f reports filesystem information for the filesystem that contains a path.

bash
stat -f -c '%T %t %s %n' / /tmp /boot

Tested output:

text
ext2/ext3 ef53 4096 /
tmpfs 1021994 4096 /tmp
ext2/ext3 ef53 4096 /boot

For ext4, GNU stat may print ext2/ext3 because the filesystem family shares the same magic number ef53. Use findmnt, lsblk, or blkid when you need the exact ext4 label.


7. Read Filesystem Properties with udevadm

udevadm can show filesystem properties stored in the udev database for a block device.

bash
udevadm info --query=property --name=/dev/sda2 | grep -E '^(DEVNAME|ID_FS_TYPE|ID_FS_UUID|ID_FS_USAGE)='

Tested output:

text
DEVNAME=/dev/sda2
ID_FS_UUID=c254a326-948a-4ae2-993b-1659f4ddcf03
ID_FS_TYPE=ext4
ID_FS_USAGE=filesystem

This is useful when writing scripts or udev rules that need filesystem metadata. For filtering output with grep, see grep command examples in Linux.


8. Check Persistent Filesystem Types in /etc/fstab

/etc/fstab stores persistent mount definitions. Its third column is the filesystem type.

bash
sed -n '1,120p' /etc/fstab

Tested output:

text
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/ubuntu-vg/ubuntu-lv during curtin installation
/dev/disk/by-id/dm-uuid-LVM-kFf1LD0IO2p3c93gyofZoxLdiniloHgQBc8QOlYT7CTzxT9yDoFmZy5GVVkyzfsl / ext4 defaults 0 1
# /boot was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/c254a326-948a-4ae2-993b-1659f4ddcf03 /boot ext4 defaults 0 1
/swap.img	none	swap	sw	0	0

/etc/fstab tells you what should be mounted persistently. It does not prove what is currently mounted. Use findmnt or /proc/mounts for the live state. For systemd-based mount alternatives, see mount a partition using systemd, mount filesystem without fstab using systemd, and mount filesystems in a specific order with systemd.


9. Check Live Mount Types from /proc/mounts and /etc/mtab

/proc/mounts is the kernel's live mount table. /etc/mtab commonly points to the current mount table on modern systems.

bash
grep -E ' / | /boot | /tmp ' /proc/mounts

Tested output:

text
/dev/mapper/ubuntu--vg-ubuntu--lv / ext4 rw,relatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,size=4335108k,nr_inodes=1048576,inode64 0 0
/dev/sda2 /boot ext4 rw,relatime 0 0

The third column is the filesystem type. The same query against /etc/mtab returned the same result on this host:

bash
grep -E ' / | /boot | /tmp ' /etc/mtab

Tested output:

text
/dev/mapper/ubuntu--vg-ubuntu--lv / ext4 rw,relatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,size=4335108k,nr_inodes=1048576,inode64 0 0
/dev/sda2 /boot ext4 rw,relatime 0 0

For most users, findmnt is easier to read than parsing these files manually. If the mounted filesystem is remote, compare the local mount output with NFS mount examples and NFS mount options.


10. Use mount Output Only for a Quick Human Check

The mount command without arguments can print the current mount table, including filesystem type. The output is usually long, so filter it:

bash
mount | grep -E ' on / | on /boot | on /tmp '

Tested output:

text
/dev/mapper/ubuntu--vg-ubuntu--lv on / type ext4 (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=4335108k,nr_inodes=1048576,inode64)
/dev/sda2 on /boot type ext4 (rw,relatime)

Use findmnt in scripts because its output columns are easier to control.


Which Command Should You Use?

Situation Best command
Check filesystem type of / or another mounted path findmnt -no SOURCE,FSTYPE,TARGET /path
Check all mounted filesystems with usage findmnt -D or df -Th
Check disks, partitions, LVM, USB, ISO lsblk -f
Check filesystem signature on a device blkid /dev/device
Find all devices of one filesystem type blkid -t TYPE=ext4
Check an unmounted device or image file -s /dev/device or blkid /dev/device
Check persistent mount definitions /etc/fstab
Check exact live kernel mount state /proc/mounts or findmnt
Repair ext filesystems after identifying type e2fsck for ext2/ext3/ext4

If you find an ext filesystem that needs repair, see repair ext4 filesystem with e2fsck. If you need to force a filesystem check during boot, see force filesystem check on boot with systemd-fsck.


Frequently Asked Questions

1. What is the fastest command to check filesystem type for a mounted path in Linux?

Use findmnt -no SOURCE,FSTYPE,TARGET /path. For example, findmnt -no SOURCE,FSTYPE,TARGET / shows the source device, filesystem type, and mount point for the root filesystem.

2. How do I check filesystem type of all mounted filesystems?

Use findmnt -D or df -Th. findmnt is usually better for mount-source details, while df -Th is convenient when you also want size and usage.

3. How do I check filesystem type of a disk or partition?

Use lsblk -f to list block devices with FSTYPE, or blkid /dev/device to read filesystem metadata such as TYPE, UUID, LABEL, and block size.

4. What is the difference between filesystem type and partition type?

Filesystem type describes the data format inside a partition or volume, such as ext4, xfs, btrfs, vfat, swap, or iso9660. Partition type describes the partition table entry and may not be the same thing.

5. Why does lsblk show LVM2_member instead of ext4?

LVM2_member means the physical device is an LVM physical volume. The real filesystem is usually on the logical volume under /dev/mapper or the volume group path.

6. Can I check filesystem type without mounting the device?

Yes. Use blkid /dev/device or file -s /dev/device. These read filesystem signatures from the device or image without mounting it.

Summary

To check filesystem type in Linux, use findmnt for mounted paths, df -Th for mounted filesystems with usage, lsblk -f for block devices, blkid for filesystem signatures, and file -s for unmounted devices or image files. Use /etc/fstab only for persistent mount definitions and /proc/mounts for the live kernel mount table.

The most reliable quick checks are findmnt -no SOURCE,FSTYPE,TARGET /path and lsblk -f. They answer different questions: findmnt tells you what is mounted at a path, while lsblk shows filesystem signatures across block devices.

Deepak Prasad

R&D Engineer

Founder of GoLinuxCloud with over a decade of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels across development, DevOps, …

  • Red Hat Certified System Administrator in Red Hat OpenStack
  • Certified Kubernetes Application Developer (CKAD)
  • Red Hat Certified Specialist in Ansible Automation
  • Go (programming language)
  • Python (programming language)
  • DevOps
  • Computer Security