The fastest way to identify a drive's filesystem on macOS is through Terminal using either diskutil
or mount
commands.
# Method 1: Using diskutil (most detailed)
diskutil list
diskutil info /dev/diskXsY | grep "File System Personality"
# Method 2: Using mount (quick overview)
mount | grep "/Volumes"
Here's how to interpret common filesystem identifiers:
- APFS: "APFS" (Apple File System, 64-bit only)
- HFS+: "Journaled HFS+" (Mac OS Extended)
- FAT32: "MS-DOS FAT32"
- exFAT: "ExFAT"
- NTFS: "NTFS" (read-only by default on macOS)
For GUI users:
- Open Disk Utility (Applications > Utilities)
- Select the volume (not the physical disk)
- Check the "Format" field in the bottom section
To check if your disk uses GPT or MBR partition scheme:
diskutil list /dev/diskX | grep "Partition Type"
Here's a complete example for checking an external SSD:
$ diskutil list
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_APFS Container disk3 499.9 GB disk2s2
$ diskutil info disk3 | grep "File System Personality"
File System Personality: APFS
- If commands return "Permission denied", prefix with
sudo
- Unmounted volumes won't show in
mount
output - usediskutil
instead - For network drives, use
mount
ornfsstat
Add this to your .bash_profile
for quick filesystem checks:
fsinfo() {
if [ -z "$1" ]; then
echo "Usage: fsinfo /dev/diskXsY or /Volumes/Name"
return 1
fi
diskutil info "$1" | grep -E "File System Personality|Volume Name|Mount Point|Partition Type"
}
The fastest way to check filesystem info on macOS is through Terminal:
diskutil info /dev/diskXsX | grep "File System Personality"
For example:
diskutil info /dev/disk2s1 | grep "File System Personality"
File System Personality: MS-DOS FAT32
For comprehensive filesystem metadata:
diskutil info /dev/diskXsX | grep -E "File System Personality|Name (User Visible)|Volume Name|Mount Point|Partition Type"
Sample output for an APFS volume:
File System Personality: APFS
Name (User Visible): APFS
Volume Name: Macintosh HD
Mount Point: /
Partition Type: 7C3457EF-0000-11AA-AA11-00306543ECAC
Using the mount
command:
mount | grep /dev/disk
Example output showing filesystem type:
/dev/disk3s1 on /Volumes/Backup (msdos, local, nodev, nosuid, noowners)
For developers needing filesystem detection in apps:
import Foundation
func getFilesystemType(for path: String) -> String? {
let keys: [URLResourceKey] = [.volumeSupportsHardLinksKey]
let url = URL(fileURLWithPath: path)
do {
let values = try url.resourceValues(forKeys: Set(keys))
return values.volumeLocalizedFormatString
} catch {
print("Error: \(error.localizedDescription)")
return nil
}
}
if let fsType = getFilesystemType(for: "/Volumes/External") {
print("Filesystem type:", fsType)
}
To determine if a filesystem is 32-bit or 64-bit:
diskutil apfs list
Look for "APFS Container (64-bit)" in the output. For HFS+ volumes:
diskutil cs list
- Always use the disk identifier (like disk2s1) rather than mount points
- For encrypted volumes, you may need to unlock them first
- Network drives may report different filesystem information