How to format a drive as ext4 from a Mac
Disk Utility can't create ext4, and neither can Extent. Install e2fsprogs with Homebrew, give the disk a Linux partition with diskutil and run its mkfs.ext4 on it – tested on macOS 27. Extent then mounts the new disk in the Finder, free to read.
Last checked · Extent needs macOS 27 or later on a Mac with Apple silicon.
Why Disk Utility can't do it
Disk Utility and diskutil format only what macOS has a formatter for: APFS, Mac OS Extended, ExFAT and MS-DOS (FAT). diskutil listFilesystems names no ext file system, even with an ext4 driver such as Extent installed. Extent reads and writes ext4, but it doesn't create or repair file systems.
Creating ext4 is the job of mkfs.ext4, part of e2fsprogs – the same tools Linux formats its disks with. They build on macOS too, and Homebrew has them ready.
Before you start
- Formatting erases everything on the disk. Copy what you need first, and check the disk's number twice before the commands below.
- Who will write to the disk on Linux? A new file system's top folder belongs to root, so an ordinary user can't add files there.
-E root_owner=1000:1000gives it to the first user instead – ID 1000 on Ubuntu, Debian and Raspberry Pi OS;id -uon the Linux machine says for sure. - Is the Linux on the other end older than 5.15? e2fsprogs 1.47, which Homebrew installs, turns on the orphan file, which Linux reads from 5.15 on. For an older kernel (
uname -r), add-O ^orphan_file. Extent reads and writes the disk either way. - A system card for a Raspberry Pi needs no formatting: Raspberry Pi Imager writes the whole card, partitions and all.
Format a drive as ext4 on the Mac
In the Terminal. You need Homebrew.
Install e2fsprogs
brew install e2fsprogs. Homebrew installs it “keg-only”, off the PATH, so the commands below call it by its full path.Find the disk
diskutil listshows it as, say,/dev/disk4– external, physical, the size of your drive. Everything after this step erases that disk.Give it one Linux partition
diskutil partitionDisk /dev/disk4 MBR %Linux% %noformat% 100%createsdisk4s1, of type Linux, and leaves it empty. MBR suits SD cards and drives up to 2 TB; for larger ones, see below.Unmount it
diskutil unmountDisk /dev/disk4Create the ext4 file system
sudo "$(brew --prefix e2fsprogs)/sbin/mkfs.ext4" -L DATA -E root_owner=1000:1000 /dev/rdisk4s1–DATAis the disk's name, up to 16 characters. It asks for your password.Disconnect the disk and connect it again
macOS doesn't look at a freshly formatted disk again by itself. Plugged back in, it mounts through Extent in the Finder, read-only until you turn writing on for it.
brew install e2fsprogs diskutil list diskutil partitionDisk /dev/disk4 MBR %Linux% %noformat% 100% diskutil unmountDisk /dev/disk4 sudo "$(brew --prefix e2fsprogs)/sbin/mkfs.ext4" -L DATA -E root_owner=1000:1000 /dev/rdisk4s1 diskutil eject /dev/disk4
Checked on macOS 27.0.1 with e2fsprogs 1.47.4 from Homebrew: the partition, the format, and Extent mounting the result by itself. Extent's own tests format physical USB drives with the same mkfs.ext4.
Drives over 2 TB: GPT instead
MBR stops at 2 TB, and diskutil refuses it on a larger drive. Use GPT, with the type Linux gives its data partitions:
diskutil partitionDisk /dev/disk4 GPT %0FC63DAF-8483-4772-8E79-3D69D8477DE4% %noformat% 100% diskutil list /dev/disk4
On a large drive diskutil puts a small EFI partition first, so the Linux one is disk4s2. It also adds a 134 MB Apple_Boot partition after any partition of 1 GB or more whose type it doesn't know. Linux has no use for it; remove it with diskutil eraseVolume "Free Space" dummy disk4s3 – the identifier diskutil list shows for Apple_Boot – then unmount and format /dev/rdisk4s2 as in steps 4 and 5.
Or let Linux do it
- On a Linux computer or a Raspberry Pi: find the drive with
lsblk, thensudo mkfs.ext4 -L DATA /dev/sdX1on its partition – or use GNOME Disks. - In a Linux virtual machine on the Mac: UTM passes a USB drive through to the virtual machine – with its QEMU backend, and on macOS 27 with Apple's too – and the same command formats it there.
Other apps that format ext4 on a Mac
Paragon extFS for Mac formats, checks and repairs ext volumes. It is a kernel extension, so on a Mac with Apple silicon it needs Reduced Security, and it costs $39.95. Every way to read and write ext4 on a Mac is compared in how to read and write ext4 on a Mac.
After formatting
- Writing from the Mac: a disk made with today's defaults – metadata checksums and their seed, 64-bit, the orphan file – is ext4 Extent writes. Writing is a one-time purchase and a switch per disk.
- Checking it: the same package has
e2fsck.sudo "$(brew --prefix e2fsprogs)/sbin/e2fsck" -fn /dev/rdisk4s1checks an unmounted disk and changes nothing. - Extent doesn't format or repair. It mounts what
mkfs.ext4makes and tells you when a disk needse2fsckon Linux.
Frequently asked questions
Can Disk Utility format a drive as ext4?
No. Disk Utility formats APFS, Mac OS Extended, ExFAT and FAT only. Use mkfs.ext4 from e2fsprogs, which Homebrew installs, on a Linux partition you create with diskutil.
Can I format an SD card as ext4 on a Mac?
Yes, the same way as a USB drive: diskutil partitionDisk with an MBR Linux partition, then mkfs.ext4. For a Raspberry Pi system card, use Raspberry Pi Imager instead; it writes the whole card.
Do I need Linux to create an ext4 disk?
No. e2fsprogs – the tools Linux itself uses – runs on macOS through Homebrew. A Linux computer, a Raspberry Pi or a Linux virtual machine works too.
Will Linux read a drive formatted on a Mac?
Yes: it is the same mkfs.ext4 Linux uses. Homebrew's version turns on the orphan file, which Linux reads from 5.15 on; for an older Linux, format with -O ^orphan_file.
Can Extent write to a drive I formatted this way?
Yes. Today's mkfs.ext4 defaults – a journal, extents, metadata checksums, 64-bit, the orphan file – are ext4 Extent writes. Reading is free; writing is a one-time purchase, turned on disk by disk.
A new ext4 disk, in the Finder.
Extent mounts ext2, ext3 and ext4 on macOS 27. Reading is free; writing to ext4 is a one-time purchase.
Sources
Checked on 2 November 2026 – the commands on macOS 27.0.1 with e2fsprogs 1.47.4, the rest against these pages.
- e2fsprogs release notes (1.47.0: orphan_file and metadata_csum_seed by default)
- Homebrew: e2fsprogs
- mke2fs(8): root_owner, features
- ext4(5): features and the kernels that read them
- UAPI Group: Discoverable Partitions Specification (the Linux data partition type)
- UTM: USB sharing
- Paragon extFS for Mac
- Raspberry Pi documentation: getting started (Raspberry Pi Imager)
- Extent on the Mac App Store