Home > Wiki Tips

How to Mount, Read, Write, Format Ext4 Partitions on Mac?

Updated on Friday, January 10, 2025

iBoysoft author Jenny Zeng

Written by

Jenny Zeng
Professional tech editor

Approved by

Jessica Shee

English

Summary: This post from iBoysoft explains everything about ext4, helping you mount ext4 partitions on Intel-based and Apple Silicon Mac, read or write to ext4 on Mac, and format drives to ext4 on macOS.

how to read ext4 on macOS

Moving from a Linux environment to macOS, you're bound to face challenges when accessing files on ext4-formatted drives from a Mac. "Is there any way to read and write to ext4 on macOS?" You may ask.

The answer is yes! There are a few ways to mount an ext4 drive on Mac with read/write access. Let's explore together!

What's the ext4 format?

Ext4, short for Fourth Extended File System, is a file system widely used by Linux and Raspberry Pi. It offers several advantages in terms of performance, reliability, and features compared to its predecessors ext2 and ext3. However, it lacks advanced features like snapshots or copy-on-write, as in modern file systems like ZFS or Btrfs.

Can Mac read ext4?

No, ext4 isn't natively supported on Mac and can't be accessed without third-party tools. When you plug an ext4 drive into Mac, you'll usually receive the message, "The disk you attached was not readable by this computer." It suggests that the ext4 drive is unreadable on Mac and can't be mounted by default.

Unreadable ext4 disk error message on Mac

How to mount ext4 on Mac with read/write access?

Usually, macOS will offer to initiate the unreadable ext4 drive for you, which will remove all data on it. However, if you need to keep data on the drive, try the following methods to mount it on Mac.

Way 1: Build a Linux virtual machine

If you simply need to transfer some files from the ext4 drive to your Mac, installing a version of Ubuntu or whatever Linux distribution you want in a virtual machine like VirtualBox is a good option. This is probably the most reliable solution to read and write to an ext4 disk on Mac.

Once the virtual machine is created, you can mount the ext4 disk and then share it with macOS.

Way 2: Install ext4fuse

If you need to read the ext4-formatted drive regularly on your Mac, it's better to add the ext4 read support for macOS by installing ext4fuse. Here's how to read ext4 on Mac:

 Note: Note that this doesn't allow you to write to ext4 on Mac, as the write operations can increase the risk of data corruption.

  1. Install Homebrew on your Mac.
  2. Open Terminal.
  3. Run the command below to install macFUSE using Homebrew.brew install --cask macfuseHow to install macFUSE
  4. Enter your administrator login password and hit Enter if prompted.
    Enter password to install macFUSE
  5. Install ext4fuse with one of the following commands.brew install ext4fuseThe problem with this command is that it may fail with the message, "ext4fuse: Linux is required for this software." If it does, use another command.
    orgit clone https://github.com/gerard/ext4fuse.git && cd "$(basename "$_" .git)" 
    make
    orcurl -s -o ext4fuse.rb https://gist.githubusercontent.com/n-stone/413e407c8fd73683e7e926e10e27dd4e/raw/12b463eb0be3421bdda5db8ef967bfafbaa915c5/ext4fuse.rb 
    brew install --formula --build-from-source ./ext4fuse.rb 
    rm ./ext4fuse.rb
  6. After installing the ext4 support software, execute the command below to check your disk identifier.diskutil listCheck disk identiifer of the ext4 drive in Mac Terminal
  7. Then create a mount point.mkdir ~/ext4_mount
  8. And mount your ext4 external hard drive on Mac after replacing disk_identifier.sudo ./ext4fuse /dev/disk_identifier ~/ext4_mount -o allow_other
  9. Once the command is executed, you'll get a popup saying "System Extension Blocked" and requiring you to open System Preferences to allow it.
  10. Click "Open System Preferences" or "System Settings" if running macOS Ventura or later.
  11. Click "Allow" on where it states, "System software from developer "xxx" was blocked from loading. This will reboot your Mac.
  12. Once your Mac is back up and running, mount the ext4 disk again.sudo ./ext4fuse /dev/disk_identifier ~/ext4_mount -o allow_other
  13. If everything goes well, you should now see the ext4 volume in your User folder and should be able to read its contents.
  14. When you're finished, unmount the ext4 partition with the command below.sudo umount ~/ext4_mount

Share the methods to help others read ext4 on Mac!

 

How to mount ext4 on Apple Silicon M1/M2/M3/M4 Mac?

Mounting ext4 on an M1 Mac or an M2, M3, or M4 Mac may be more tricky. Some users mentioned that he was able to mount ext4 via FUSE on an Intel-based Mac before, but with the upgrade to macOS Big Sur, he had to switch to VirtualBox. Now he has an M1 Mac, VirtualBox is out of the picture.

So, if the previous method doesn't work for you or you get the error "Error: ext4fuse has been disabled because it requires FUSE" after trying to install ext4fuse, try these steps instead.

How to mount ext4 on M1/M2/M3/M4 Mac:

  1. Open Terminal.
  2. Create an empty script file and open it with the code editor nano.nano ext4fuse.rb
  3. Copy and paste the code from marcuspridham in this post to the script and save it.
  4. From the ext4fuse.rb directory, first install macfuse and then ext4fuse. 
    brew install macFusebrew install --formula --build-from-source ext4fuse.rb
  5. Ensure the drive is connected to your M1/M2/M3/M4 Mac.
  6. Note down the disk identifier of your ext4 drive, such as disk2.diskutil list
  7. Mount the ext4 drive after replacing disk_identifier.sudo ext4fuse /dev/disk_identifier /Volumes/external_device -o allow_other
  8. Type your password and press Enter.

How to format ext4 on Mac?

For anyone who wants to format an external drive in ext4 on Mac, you can run a Linux virtual machine and format the disk to ext4 using Ubuntu or whatever Linux distribution of your choice.

If it doesn't work or you think it tedious, give the following procedures a try:

  1. Install Homebrew on your Mac.
  2. Open Terminal.
  3. Run the following command to install e2fsprogs using Homebrew.brew install e2fsprogs
  4. Check the disk identifier of your external drive. For example, disk2.diskutil list
  5. Unmount the external drive.diskutil unmountDisk disk_identifier
  6. Format the drive to ext4.sudo $(brew --prefix e2fsprogs)/sbin/mkfs.ext4 /dev/disk_identifier
  7. Input your password and hit Enter.

What works for you? Share to benefit others!