# Mounting APFS Partition on Linux

**Original Version:** [https://www.baeldung.com/linux/apfs-partition-mount](https://www.baeldung.com/linux/apfs-partition-mount)

## apfs-fuse

### Installation

We’ll need to compile the driver from source. For that reason, we’ll need to download and install the dependencies first. So, let’s go ahead and install them using a package manager.

On Debian, Ubuntu, and Debian-based derivatives, we can use [*apt*](https://www.baeldung.com/linux/yum-and-apt#apt-advanced-packaging-tool):

```bash
$ sudo apt install fuse libfuse3-dev bzip2 libbz2-dev cmake gcc g++ git libattr1-dev zlib1g-dev
```

Similarly, we can use [*yum*](https://www.baeldung.com/linux/yum-and-apt#yum-yellowdog-updater-modified) for Fedora and RHEL distributions:

```bash
$ sudo apt install fuse fuse3 bzip2 cmake gcc g++ git libattr zlib
```

Next, let’s clone the repository into an empty directory:

```bash
$ git clone https://github.com/sgan81/apfs-fuse
```

Then, we initialize the submodule:

<div class="code-block code-block-3" id="bkmrk-">  
</div>```bash
$ cd apfs-fuse && git submodule update --init
```

Now, we’re ready to compile the driver:

```
$ mkdir build && cd build && cmake .. && make
```

Alternatively, the driver is also available on the Fedora package repository under the canonical name [*apfs-fuse*](https://packages.fedoraproject.org/pkgs/apfs-fuse/apfs-fuse/).

Once the driver is installed, let’s verify it:

```bash
$ whereis apfs-fuse
apfs-fuse: /usr/bin/apfs-fuse
```

### Mounting APFS Drive

*apfs-fuse* follows the Linux convention for [mounting and unmounting](https://www.baeldung.com/linux/mount-unmount-filesystems) filesystems:

```bash
$ mount <DEVICE> <MOUNT_PATH>
```

With that in mind, let’s mount an APFS drive using the *apfs-fuse* helper:

<div class="code-block code-block-4" id="bkmrk--1">  
</div>```bash
$ apfs-fuse /dev/sdd1 /mnt/apfs-data
```

Similarly, **we can specify the [mount options](https://github.com/sgan81/apfs-fuse#mount-options--o-) using *-o***:

```bash
$ mount -o allowother /dev/sdd1 /mnt/apfs-data
```

### Unmounting APFS Drive

In the same way, we can unmount the partition as root using [*umount*](https://www.baeldung.com/linux/mount-unmount-filesystems#umount):

```bash
$ umount /mnt/apfs-data
```

As a user, we can use the [*fusermount*](https://man7.org/linux/man-pages/man1/fusermount3.1.html) utility:

```bash
$ fusermount -u /mnt/apfs-data
```