Mounting Linux Filesystems on macOS with  anylinuxfs

Pochuan WangPochuan Wang
4 min read

Managing disks that come from a Linux box can be surprisingly painful on macOS. anylinuxfs is a Homebrew-installable tool that makes the process almost trivial—no kernel extensions, no lowering of SIP, and full read-write support for any filesystem Linux can handle. Below is a concise guide that I wrote for my own notes; I’m publishing it here in the hope that it saves others a few headaches as well.

1 · Why is this a Problem?

macOS simply cannot read or write most Linux filesystems out of the box. Community-driven options such as ext4fuse exist, but they are read-only and have trouble on Apple Silicon. Commercial drivers like Paragon extFS add write support, yet they cost money, lack LUKS support, and still require a kernel extension.

The usual fallback is to run a full Linux virtual machine, attach the physical disk there, and re-export the files over the network—functional, but clunky and slow. anylinuxfs streamlines that entire workflow into a single command.


2 · What Makes anylinuxfs Different?

Featureanylinuxfsext4fuseParagon extFS
Read + Write
Apple Silicon support✅ (AArch64 only)Often fails
LUKS-encrypted drives
LVM & multi-drive VG
Requires kernel kext✅ (macFUSE)

anylinuxfs achieves this by starting a micro Linux VM (via libkrun) every time you mount a disk. That VM performs a native mount inside Linux, then shares the mounted directory back to macOS over a localhost-only NFS export. Because libkrun launches a stripped-down kernel without UEFI or userspace bloat, the whole process takes only a couple of seconds. No persistent daemons run when nothing is mounted.

Key capabilities

  • Any filesystem the Linux kernel supports—ext2/3/4, btrfs, xfs, zfs, you name it

  • Full read/write, including advanced mount flags (subvolumes, ro, etc.)

  • LUKS decryption, plain or nested under LVM

  • Works with disks using GPT, MBR, or no partition table at all

  • Default NFS share limited to 127.0.0.1; can be opened to your LAN when required

3 · Installation and First Steps

Prerequisites

  • Apple Silicon Mac (libkrun limitation)

  • Homebrew

  • sudo privileges to read /dev/disk*

  • Full-Disk-Access for Terminal the first time you access external drives

brew tap nohajc/anylinuxfs
brew install anylinuxfs

The first run downloads an Alpine Linux rootfs into ~/.anylinuxfs/ and auto-configures the microVM environment.

3.1 · Discover Drives

sudo anylinuxfs list

You’ll get a nicely formatted inventory that includes LUKS containers and LVM volume groups.

3.2 · Mount an ext4 Partition

sudo anylinuxfs /dev/disk3s1       # read-write by default
# or
sudo anylinuxfs /dev/disk3s1 -o ro # read-only

Finder will show a new NFS share named after the disk identifier. To unmount, either eject in Finder or:

umount /Volumes/disk3s1   # on macOS
anylinuxfs stop           # in case something hung

3.3 · Decrypt and Mount LUKS + LVM

# Inspect LUKS metadata
sudo anylinuxfs list -d /dev/disk4

# Mount the decrypted partition
sudo anylinuxfs /dev/disk4

3.4 · Share Beyond localhost (optional)

sudo anylinuxfs /dev/disk3s1 -b 0.0.0.0        # world-visible
sudo anylinuxfs /dev/disk3s1 -b 192.168.1.0/24 # only local subnet

4 · Tips

  • One disk at a time: current limitation—you’ll need to unmount before attaching the next drive.

  • Permissions: macOS sees NFS files as owned by nobody; create a writable folder or use sudo when you need write access.

  • Quarantine flag: copying .app bundles might fail with fcopyfile … Operation not permitted; strip the flag via xattr -d com.apple.quarantine file.

  • Memory: LUKS decryption requires ≥ 2.5 GiB RAM allocated to the VM; anylinuxfs auto-adjusts if needed.

5 · Conclusion

For years, mounting a Linux disk on macOS meant juggling FUSE drivers, disabling security, or booting a heavyweight VM. anylinuxfs provides a clean, modern alternative: a minimal microVM that speaks the Linux kernel’s native filesystems and hands the result to macOS over an ephemeral NFS share. It supports everything from plain ext4 USB sticks to multi-disk LVM-on-LUKS arrays, without touching the kernel or your system’s security posture.

If you routinely shuttle drives between Linux and macOS—or you just need a safe, write-capable way to rescue files from a Linux partition—give anylinuxfs a try. I have already replaced my ad-hoc VM workflows with a single sudo anylinuxfs … command, and I doubt I’ll look back.

0
Subscribe to my newsletter

Read articles from Pochuan Wang directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Pochuan Wang
Pochuan Wang