Mac partition on Ubuntu

Mascote do LinuxPro conectando o disco do Mac ao notebook e acessando as pastas pelo Linux

Note (2026): The original article from April 2017 explained how to mount HFS+ on Ubuntu 16.04. Since High Sierra, the Mac uses APFS by default. HFS+ still appears on old disks and some Time Machine backups; the approach in 2026 is to identify the filesystem and mount the right one — preferably read-only.

Plugged a Mac's HDD/SSD into Ubuntu and Nautilus did not open anything? In 2017 the answer was hfsprogs. That still applies to HFS+. For Macs from 2018 onward, the volume is almost always APFS — and the Linux kernel still does not include it out of the box.

Find out what is on the disk

Before mounting, check the type. Replace sdX with the device that appeared (USB becomes sdb/sdc; internal NVMe, nvme0n1):

lsblk -f
sudo blkid

What matters in the column FSTYPE / in TYPE=:

  • hfsplus — old Mac (pre-High Sierra) or Time Machine on HFS+.
  • apfs (sometimes just “Apple APFS” in fdisk -l) — the current default. A container in APFS can have multiple volumes (Macintosh HD, Data, Preboot, Recovery).
  • exfat / vfat — external disk formatted to work alongside Windows. Ubuntu mounts it automatically; you do not need this post.

The APFS was introduced in iOS 10.3 / macOS 10.13. If the Mac is from 2018+, start with the APFS section.

HFS+: the 2017 approach (still works)

Package hfsprogs — it is still in the repository on Ubuntu 24.04/26.04. The kernel usually mounts journaled HFS+ read-only; force,rw ignores the journal. Keep this warning in mind: it can cause corruption if the Mac did not unmount it cleanly.

sudo apt update
sudo apt install hfsprogs

sudo mkdir -p /mnt/mac
# só leitura (recomendado para copiar arquivo e ir embora)
sudo mount -t hfsplus -o ro /dev/sdXY /mnt/mac

# leitura e escrita — o original deste post:
sudo fsck.hfsplus /dev/sdXY
sudo mount -t hfsplus -o force,rw /dev/sdXY /mnt/mac

Replace sdXY with the correct partition (sdb2, etc.). If fsck.hfsplus complains about the journal, the Mac booted with the disk — unmount it there first, or settle for read-only.

APFS: kernel module (Ubuntu)

The community driver is linux-apfs-rw (Ernesto Fernández). On Ubuntu the package is called apfs-dkms (source linux-apfs-rw, universe). It builds against the current kernel via DKMS:

sudo apt update
sudo apt install apfs-dkms linux-headers-$(uname -r)

sudo modprobe apfs
sudo mkdir -p /mnt/mac
# só leitura — o default do módulo, de propósito
sudo mount -t apfs -o ro /dev/sdXY /mnt/mac

Container with more than one volume: -o ro,vol=0 (or vol=1 for Data). dmesg tells you which volume was mounted:

sudo dmesg | grep -i apfs
ls /mnt/mac

Writing is experimental. The module itself warns you in dmesg and requires the explicit option readwrite. It can corrupt the container. To recover photos and documents, stick with ro.

# só se você aceita o risco (README do projeto)
sudo mount -t apfs -o readwrite /dev/sdXY /mnt/mac

Encrypted APFS and FileVault

The linux-apfs-rw does not implement encryption, even for reading. A FileVault / APFS encrypted disk on Linux with this module = an empty volume or an error. The FUSE driver apfs-fuse accepts a password (-r) and is read-only — a recovery path when the Mac will not boot:

sudo apt install fuse3 libfuse3-dev bzip2 libbz2-dev cmake g++ git libattr1-dev zlib1g-dev
git clone https://github.com/sgan81/apfs-fuse
cd apfs-fuse
git submodule update --init
mkdir build && cd build
cmake .. && make
sudo mkdir -p /mnt/mac
sudo ./apfs-fuse -o allow_other,ro /dev/sdXY /mnt/mac
# se pedir senha, o volume está criptografado

The internal SSD of a Mac with a T2 / Apple Silicon chip is usually more complicated (hardware-bound encryption). An external disk without FileVault is the happy path for this how-to.

Unmounting

sudo umount /mnt/mac

If FUSE hangs: sudo umount -l /mnt/mac.

References

Summary: lsblk -f first. HFS+ with hfsprogs. APFS with apfs-dkms, read-only. FileVault: apfs-fuse or, better yet, a Mac that still boots.