As you may already know, the Linux supports numerous filesystems, such as Ext4, ext3, ext2, sysfs, securityfs, FAT16, FAT32, NTFS, and many. The most commonly used filesystem is Ext4. Ever wondered what type of filesystem are you currently using in your Linux system? No? Worry not! We got your back. This guide explains how to find the mounted filesystem type in Unix-like operating systems.
### Find The Mounted Filesystem Type In Linux
There can be many ways to find the filesystem type in Linux. Here, I have given 8 different methods. Let us get started, shall we?
#### Method 1 – Using findmnt command
This is the most commonly used method to find out the type of a filesystem. The **findmnt** command will list all mounted filesystems or search for a filesystem. The findmnt command can be able to search in **/etc/fstab** , **/etc/mtab** or **/proc/self/mountinfo**.
findmnt command comes pre-installed in most Linux distributions, because it is part of the package named **util-linux**. Just in case if it is not available, simply install this package and you’re good to go. For instance, you can install **util-linux** package in Debian-based systems using command:
```
$ sudo apt install util-linux
```
Let us go ahead and see how to use findmnt command to find out the mounted filesystems.
If you run it without any arguments/options, it will list all mounted filesystems in a tree-like format as shown below.
```
$ findmnt
```
**Sample output:**
![][2]
As you can see, the findmnt command displays the target mount point (TARGET), source device (SOURCE), file system type (FSTYPE), and relevant mount options, like whether the filesystem is read/write or read-only. (OPTIONS). In my case, my root(/) filesystem type is EXT4.
If you don’t like/want to display the output in tree-like format, use **-l** flag to display in simple, plain format.
```
$ findmnt -l
```
![][3]
You can also list a particular type of filesystem, for example **ext4** , using **-t** option.
You can even find filesystems with specific label:
```
$ findmnt LABEL=Storage
```
For more details, refer the man pages.
```
$ man findmnt
```
The findmnt command is just enough to find the type of a mounted filesystem in Linux. It is created for that specific purpose only. However, there are also few other ways available to find out the filesystem type. If you’re interested to know, read on.
#### Method 2 – Using blkid command
The **blkid** command is used locate and print block device attributes. It is also part of the util-linux package, so you don’t bother to install it.
To find out the type of a filesystem using blkid command, run:
```
$ blkid /dev/sda1
```
#### Method 3 – Using df command
The **df** command is used to report filesystem disk space usage in Unix-like operating systems. To find the type of all mounted filesystems, simply run:
```
$ df -T
```
**Sample output:**
![][4]
For details about df command, refer the following guide.
Also, check man pages.
```
$ man df
```
#### Method 4 – Using file command
The **file** command determines the type of a specified file. It works just fine for files with no file extension.
Run the following command to find the filesystem type of a partition:
The **fsck** command is used to check the integrity of a filesystem or repair it. You can find the type of a filesystem by passing the partition as an argument like below.
**fstab** is a file that contains static information about the filesystems. This file usually contains the mount point, filesystem type and mount options.
To view the type of a filesystem, simply run:
```
$ cat /etc/fstab
```
![][5]
For more details, refer man pages.
```
$ man fstab
```
#### Method 7 – Using lsblk command
The **lsblk** command displays the information about devices.
To display info about mounted filesystems, simply run:
The **mount** command is used to mount a local or remote filesystems in Unix-like systems.
To find out the type of a filesystem using mount command, do:
```
$ mount | grep "^/dev"
/dev/sda2 on / type ext4 (rw,relatime,commit=360)
/dev/sda1 on /boot type ext4 (rw,relatime,commit=360,data=ordered)
```
For more details, refer man pages.
```
$ man mount
```
And, that’s all for now folks. You now know 8 different Linux commands to find out the type of a mounted Linux filesystems. If you know any other methods, feel free to let me know in the comment section below. I will check and update this guide accordingly.