Mount an Apple APFS drive in Ubuntu

Mount an Apple APFS drive in Ubuntu

Install ‘fsapfsmount’:

sudo apt install libfsapfs-utils

List your drives:

sudo fdisk -l

Look for the drive you want to mount. Example:

Device      Start        End    Sectors   Size Type
/dev/sdb1      40     409639     409600   200M EFI System
/dev/sdb2  409640 2000409223 1999999584 953.7G unknown

/dev/sdb2 is the drive we want to mount

Issue the command to mount the drive:

sudo fsapfsmount -f 1 [source] [directory to mount at]

sudo fsapfsmount -f 1 /dev/sdb2 /media/usb

The drive contents will be inaccessible to all but the root user.
If you want to launch the Ubuntu File Manager as root:

sudo xdg-open .

9 thoughts on “Mount an Apple APFS drive in Ubuntu”

  1. What if terminal returns “unable to open source container”?

    Then it goes off about superblock and blah blah blah

    Thanks for the glimmer of hope on retrieving information from a mac. The owner of this system died and her sister is wanting to retrieve her files and especially something about a family tree but testdisk didn’t apparently get everything she is looking for.

    (God I hate working on macs and windows machines…it’s so counter-productive).

  2. Thanks for posting this.

    1) How could one access the directory via command line? I access my device via SSH and don’t know how to access the mounted drive as root.

    2) Is it possible to mount the drive not by the “/dev/sdb2” which can change but but instead the GUID?

    Thanks Again!

    1. Hi, John. You can do it by first doing chown username /dev/sdb2, and then do this without sudo, as username:

      sudo mkdir /mnt/2tbnvme
      sudo chown username /mnt/2tbnvme
      sudo chown username /dev/sdb2
      fsapfsmount -f 1 /dev/sdb2 /mnt/2tbnvme

      1. Unfortunately, this did not work with Ubuntu 22.04, and still says that it is ‘Unable to open source container.

  3. Hi thank you for this. I have an encrypted apfs drive and get the message: Unable to unlock source container. Do you have any idea about how to decrypt and then mount an apfs partition? Kind regards

  4. 500GB Seagate ext USB HD w. Mac HFS+ still doesn’t show devices, hence cannot be mounted 🙁
    Disk /dev/sdb: 465.76 GiB, 500107862016 bytes, 976773168 sectors
    Disk model: 21-1KJ152
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Leave a Reply to Paal Cancel reply

Your email address will not be published.