Linux how to determine the file system type

All files accessible in a Linux system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices and they can be remote or local file system. Linux supports numerous file system types. For example it supports Ext2,. Ext3, NFS, FA16, FAT32, NTFS,Sysfs, Procfs etc. To determine the file system type or to find out what type of file systems currently mounted you need to use command called mount or df. Type df command as follows:
$ df -TOutput:

ADVERTISEMENTS

Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/hdb1     ext3    19228276  14737848   3513680  81% /
tmpfs        tmpfs      383960         4    383956   1% /dev/shm

df command report filesystem disk space usage and if you pass -T option it will report filesystem type. As you see second command displays file system type (ext3). Type, mount command as follows at shell prompt:
$ mountOutput:

/dev/hdb1 on / type ext3 (rw,errors=remount-ro)
/dev/hdb2 on /home type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
automount(pid3558) on /data type autofs (rw,fd=4,pgrp=3558,minproto=2,maxproto=4)

As you can see, second last column displays the file system type. For example first line [/dev/hdb1 on / type ext3 (rw,errors=remount-ro)] can be interpreted as follows:

  • /dev/hdb1 : Partition
  • / : File system
  • ext3 : File system type
  • (rw,errors=remount-ro) : Mount options

See also:

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
19 comments… add one
  • Peter Flynn Aug 29, 2007 @ 14:43

    What is the best procedure for identifying the file system type of unmounted SCSI disks (salvaged from a dead Alpha [Digital Unix 4] system)?

  • diatoid Oct 30, 2007 @ 2:35

    You can try a ‘file -s’ on the device node.

  • cefirum Aug 22, 2008 @ 14:10

    @diatoid

    great hint, thanks a lot!

  • Chris Musasizi Nov 9, 2009 @ 9:32

    use “cat /etc/fstab”.
    Also “fsck -N”

  • dingo Dec 13, 2009 @ 22:22

    thanks chris
    “fsck -N /dev/sda1” was exactly what i was looking for. it turns out i am running an old ext2 , arn’t we at ext4 now?

  • en Feb 15, 2011 @ 5:47

    Thank you!

  • Derek May 23, 2011 @ 15:12

    Make sure you have root privileges when running ‘fsck -N ‘

    It won’t complain when it is run without them and it reports ext2 in error.

  • Vlad Jun 25, 2011 @ 17:48

    > diatoid October 30, 2007
    > You can try a ‘file -s’ on the device node.

    This is best -it shows the info even device not mounted yet. So you can check the file system then mount -t proper type.

    • mohn Dec 6, 2011 @ 10:58

      how to find a system up in network?
      (what all the systems in a network command)

  • mohn Dec 6, 2011 @ 11:02

    main diff b/n ntfs & fat

  • dave Jan 12, 2012 @ 3:23

    this won’t work for files, how do I determine the filesystem type of a bin file? I need to mount it

  • Hmm... May 25, 2012 @ 7:34

    Typing $ df -T as administrator into root just gives me the error: $: command not found

    : \

  • Hmm... May 25, 2012 @ 7:37

    Nevermind, command works fine…Don’t put a dollar sign infront of it like it was said above to do xD I’m running ext4 btw ^_^ thanks for the article ^^

  • TY Dec 18, 2012 @ 0:07

    Great Thanks.
    cyberciti.biz Rocks!
    Keep up dude.

  • Denny Jul 31, 2013 @ 15:20

    [root@localhost ~]# blkid /dev/sda1
    /dev/sda1: UUID=”6fa0c372-2614-43b1-a2ed-52fc53c4ff19″ TYPE=”ext4″
    or
    for more info you can use tune2fs -l /dev/sda1

  • NItesh Sep 16, 2013 @ 11:26

    HI i wanna know that how i canMount the partition containing /opt/arcsight/ with inode64 option.

  • aref ghobadi Aug 22, 2015 @ 7:01

    Hi
    thank you

  • bSwaan Oct 7, 2016 @ 1:58

    A fellow I used to know was on his first day as a linux sysadmin. The main hard disk on the primary BBS server was dangerously full, and he was tasked with clearing it out.
    He discovered the “/etc” directory was full to bursting. He reasoned, “who puts important stuff into a folder called “/etc”? So he wiped out the whole thing.

    That was his last day on the job.

    • bSwaan Oct 7, 2016 @ 2:00

      1000 apologies. This wound up on the wrong thread because captcha timed out and I didn’t notice. Please delete.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.