Is there a command to tell what type of filesystem you're using?
Your question can be taken several ways. Literally Karlson's answer is pretty cool because it tells you the filesystem of the volume | partition that you are currently on.
df -hT I have always liked this command because it shows you all the "standard" filesystems that are mounted and does it in human-readable size format.
However, you may have other disks or volumes that are not mounted (commented out), failed to mount, or have been unmounted. Another thing you can do is to run
cat /etc/fstab this will show you the "filesystem table" and list the filesystems that are supposed to be mounted on boot along with the location, filesystem type, mountpoint, and more.
stat command on Linux systems is used to display file or file system status. For more information read manpage by running
man stat in terminal.
$ stat -f -c %T / xfs $ stat -f -c %T /boot ext2/ext3 $ stat -f -c %T /srv btrfs $ stat -f -c %T /tmp tmpfs
Flags used above:
-f, --file-system - display file system status instead of file status
-c --format=FORMAT - use the specified FORMAT instead of the default output a newline after each use of FORMAT
Valid format sequences for file systems:
%T - Type in human readable form
blkid -o value -s TYPE "$DEV", it also works for unmounted devices or even image files.
On GNU Linux you can get an overview of your storage using
lsblk and then get the file system type for the device you're interested using something like one of the following:
$ fsck -N /dev/sda1(you don't need superuser powers to use this command)
# file -s /dev/sda1
# blkid /dev/sda1
These may be useful if your file system is on a LVM volume, since
lsblk won't tell you what file system is in there.