Is there a way to find out what file system my partitions are using?
5 Answers
There are a number of ways to do this from the command line (Ctrl+Alt+t):
The command df -T
will print your filesystem types, as follows:
~$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda1 ext4 190230236 102672812 77894244 57% /
udev devtmpfs 1021128 12 1021116 1% /dev
tmpfs tmpfs 412884 816 412068 1% /run
none tmpfs 5120 0 5120 0% /run/lock
none tmpfs 1032208 2584 1029624 1% /run/shm
cgroup tmpfs 1032208 0 1032208 0% /sys/fs/cgroup
/dev/sdb1 fuseblk 1953480700 1141530424 811950276 59% /home/user/storage
This article sums up several other methods of obtaining this information.
Here are a couple of other examples that I use occasionally:
~$ mount | grep "^/dev"
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
/dev/sdb1 on /home/user/storage type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
~$ sudo file -sL /dev/sda1
/dev/sda1: Linux rev 1.0 ext4 filesystem data, UUID=b53ecdf7-5247-4d65-91a6-be9264c84dea (extents) (large files) (huge files)
-
9
-
5Note that with $ df -T filesystem called fuseblk means NTFS but $ sudo lsblk -f actually shows ntfs.– MikeJul 24, 2015 at 15:30
-
1The last one (
sudo file -sL /dev/sda1
) is exactly what I needed - you should put that one first. Aug 27, 2015 at 16:21 -
You can also use the lsblk
command like this:
$ sudo lsblk -f
NAME FSTYPE LABEL MOUNTPOINT
sda
├─sda1 ntfs OS
├─sda2 ntfs Data
├─sda3
├─sda5 ext4 /
└─sda6 swap [SWAP]
-
1It shows blank for several partitions. How do I see the File System byte for those? Feb 12, 2016 at 4:21
-
2
-
sudo is not needed when sysfs and udev are available. -f doesn't seem to be needed either as fstype is printed by default. Mar 16, 2019 at 18:21
A simple and good command
sudo blkid
It will list something like this:
/dev/sda1: LABEL="Windows" UUID="FA50DCB150DC763B" TYPE="ntfs"
/dev/sda5: LABEL="40GBTWO" UUID="00A0CE7EA0CE7A24" TYPE="ntfs"
/dev/sda6: UUID="7550252c-3da7-4cd9-8da3-71e9ba38e74a" TYPE="ext4"
/dev/sda7: UUID="088fd084-a011-4896-aa93-c0caaad60620" TYPE="swap"
Where /dev/sda1
is the partition, LABEL
is the given name to the partition, UUID
is the Unique ID of the partiton which is quite useful to mount the hardisk using /etc/fstab
, and TYPE
is the file system.
I often use this command to get almost all the information about my hard drive and removal drive. Hope you too like it. :)
-
+1, good solution. Note that
blkid
does not need to be run as root. Also, you can give a specific partition as an argument toblkid
and get info for just that partition, a lablkid /dev/sda1
. Aug 27, 2015 at 16:27 -
In the Dash type Disk and open the disk utility application, which is called either Disk Utility in Ubuntu 12.04 and Ubuntu 12.10, or Disks in Ubuntu 13.04 and later.
The screenshot shows the Disks window with the 500 GB Hard Disk selected to display information about that disk. In the center pane in the Volumes section you can see that the second partition on that hard disk has been selected to display information about that partition. In the Volumes section you can also see the description Contents: Ext4 which means that the partition is formatted as Ext4 which is the default Ubuntu filesystem format.
-
+0 Nice that there is a GUI way of doing this, but anyone who really cares what filesystem they are using (or even knows what a "filesystem" is) is probably looking for a command line solution. Aug 27, 2015 at 16:23
-
-
1@AJMansfield while CLI is more robust and will work in rescue environment (
initramfs
), when you have very complex partitioning situation, with multiple volume groups, raid, etc. a graphical tool makes it easier to read May 5, 2018 at 11:15
Try this in terminal:
sudo fdisk -l
Simply copy & paste the command into your terminal.
If I understand you correctly, this should show your drives.
-
13
-
My fdisk (2.20.1 on Ubuntu 14.04) shows the FS, albeit not very specifically. "Linux" instead of ext4, etc. Jun 12, 2015 at 14:53
-
@MatthewRead that is based on a numerical code which is usually, but not always, correct - almost everything ignores the code, so it doesn't have to be correct, and it might not be. Dec 26, 2015 at 11:40
-
+1 This is the only answer that worked for me -- nothing else would tell me if my partitions were 82, 83, or 8e. Feb 12, 2016 at 4:24
-
Please note that while fdisk will tell you what (family) of file systems is supposed to be on a given partition, it does not check if an actual filesystem is present on any given partition. Also, for Linux that information is not even advisory, it will mount an FS irrespective of partition Id (type). May 5, 2018 at 11:19
sudo blkid -o list > ~/myFileSytems
on a terminal to found out. Then open the filemyFileSystems
with a text editor (the file should be in your home folder). But I consider that is not your main issue, you might want to provide more info in your question.