{"id":118,"date":"2017-04-05T21:00:03","date_gmt":"2017-04-06T00:00:03","guid":{"rendered":"https:\/\/www.linuxpro.com.br\/2017\/04\/hd-do-mac-ubuntu\/"},"modified":"2026-09-08T10:31:55","modified_gmt":"2026-09-08T13:31:55","slug":"hd-do-mac-ubuntu","status":"publish","type":"post","link":"https:\/\/www.linuxpro.com.br\/en\/2017\/04\/hd-do-mac-ubuntu\/","title":{"rendered":"Mac partition on Ubuntu"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" alt=\"Mascote do LinuxPro conectando o disco do Mac ao notebook e acessando as pastas pelo Linux\" src=\"\/wp-content\/uploads\/2026\/09\/hd-do-mac-v2.webp\" width=\"1486\" height=\"856\" \/><\/p>\n<div style=\"background:#fff8e1;border-left:4px solid #8b1a1a;padding:.8em 1em;margin:1em 0\"><strong>Note (2026):<\/strong> The original article from April 2017 explained how to mount HFS+ on Ubuntu 16.04. Since High Sierra, the Mac uses <strong>APFS<\/strong> 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 \u2014 preferably read-only.<\/div>\n<p>Plugged a Mac's HDD\/SSD into Ubuntu and Nautilus did not open anything? In 2017 the answer was <code data-no-translation=\"\">hfsprogs<\/code>. That still applies to HFS+. For Macs from 2018 onward, the volume is almost always APFS \u2014 and the Linux kernel still does not include it out of the box.<\/p>\n<p><!-- more --><\/p>\n<h2>Find out what is on the disk<\/h2>\n<p>Before mounting, check the type. Replace <code data-no-translation=\"\">sdX<\/code> with the device that appeared (USB becomes <code data-no-translation=\"\">sdb<\/code>\/<code data-no-translation=\"\">sdc<\/code>; internal NVMe, <code data-no-translation=\"\">nvme0n1<\/code>):<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">lsblk -f\nsudo blkid\n<\/code><\/pre>\n<p>What matters in the column <code data-no-translation=\"\">FSTYPE<\/code> \/ in <code data-no-translation=\"\">TYPE=<\/code>:<\/p>\n<ul>\n<li><code data-no-translation=\"\">hfsplus<\/code> \u2014 old Mac (pre-High Sierra) or Time Machine on HFS+.<\/li>\n<li><code data-no-translation=\"\">apfs<\/code> (sometimes just \u201cApple APFS\u201d in <code data-no-translation=\"\">fdisk -l<\/code>) \u2014 the current default. A <em>container<\/em> in APFS can have multiple volumes (Macintosh HD, Data, Preboot, Recovery).<\/li>\n<li><code data-no-translation=\"\">exfat<\/code> \/ <code data-no-translation=\"\">vfat<\/code> \u2014 external disk formatted to work alongside Windows. Ubuntu mounts it automatically; you do not need this post.<\/li>\n<\/ul>\n<p>The <a href=\"\/en\/2017\/04\/novo-sistema-de-arquivos-da-apple\/\">APFS<\/a> was introduced in iOS 10.3 \/ macOS 10.13. If the Mac is from 2018+, start with the APFS section.<\/p>\n<h2>HFS+: the 2017 approach (still works)<\/h2>\n<p>Package <code data-no-translation=\"\">hfsprogs<\/code> \u2014 it is still in the repository on Ubuntu 24.04\/26.04. The kernel usually mounts journaled HFS+ read-only; <code data-no-translation=\"\">force,rw<\/code> ignores the journal. Keep this warning in mind: it can cause corruption if the Mac did not unmount it cleanly.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo apt update\nsudo apt install hfsprogs\n\nsudo mkdir -p \/mnt\/mac\n# s\u00f3 leitura (recomendado para copiar arquivo e ir embora)\nsudo mount -t hfsplus -o ro \/dev\/sdXY \/mnt\/mac\n\n# leitura e escrita \u2014 o original deste post:\nsudo fsck.hfsplus \/dev\/sdXY\nsudo mount -t hfsplus -o force,rw \/dev\/sdXY \/mnt\/mac\n<\/code><\/pre>\n<p>Replace <code data-no-translation=\"\">sdXY<\/code> with the correct partition (<code data-no-translation=\"\">sdb2<\/code>, etc.). If <code data-no-translation=\"\">fsck.hfsplus<\/code> complains about the journal, the Mac booted with the disk \u2014 unmount it there first, or settle for read-only.<\/p>\n<h2>APFS: kernel module (Ubuntu)<\/h2>\n<p>The community driver is <a href=\"https:\/\/github.com\/linux-apfs\/linux-apfs-rw\">linux-apfs-rw<\/a> (Ernesto Fern\u00e1ndez). On Ubuntu the package is called <code data-no-translation=\"\">apfs-dkms<\/code> (source <code data-no-translation=\"\">linux-apfs-rw<\/code>, universe). It builds against the current kernel via DKMS:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo apt update\nsudo apt install apfs-dkms linux-headers-$(uname -r)\n\nsudo modprobe apfs\nsudo mkdir -p \/mnt\/mac\n# s\u00f3 leitura \u2014 o default do m\u00f3dulo, de prop\u00f3sito\nsudo mount -t apfs -o ro \/dev\/sdXY \/mnt\/mac\n<\/code><\/pre>\n<p>Container with more than one volume: <code data-no-translation=\"\">-o ro,vol=0<\/code> (or <code data-no-translation=\"\">vol=1<\/code> for Data). dmesg tells you which volume was mounted:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo dmesg | grep -i apfs\nls \/mnt\/mac\n<\/code><\/pre>\n<p><strong>Writing is experimental.<\/strong> The module itself warns you in dmesg and requires the explicit option <code data-no-translation=\"\">readwrite<\/code>. It can corrupt the container. To recover photos and documents, stick with <code data-no-translation=\"\">ro<\/code>.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\"># s\u00f3 se voc\u00ea aceita o risco (README do projeto)\nsudo mount -t apfs -o readwrite \/dev\/sdXY \/mnt\/mac\n<\/code><\/pre>\n<h2>Encrypted APFS and FileVault<\/h2>\n<p>The <code data-no-translation=\"\">linux-apfs-rw<\/code> <strong>does not implement encryption<\/strong>, even for reading. A FileVault \/ APFS encrypted disk on Linux with this module = an empty volume or an error. The FUSE driver <a href=\"https:\/\/github.com\/sgan81\/apfs-fuse\">apfs-fuse<\/a> accepts a password (<code data-no-translation=\"\">-r<\/code>) and is read-only \u2014 a recovery path when the Mac will not boot:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo apt install fuse3 libfuse3-dev bzip2 libbz2-dev cmake g++ git libattr1-dev zlib1g-dev\ngit clone https:\/\/github.com\/sgan81\/apfs-fuse\ncd apfs-fuse\ngit submodule update --init\nmkdir build &amp;&amp; cd build\ncmake .. &amp;&amp; make\nsudo mkdir -p \/mnt\/mac\nsudo .\/apfs-fuse -o allow_other,ro \/dev\/sdXY \/mnt\/mac\n# se pedir senha, o volume est\u00e1 criptografado\n<\/code><\/pre>\n<p>The internal SSD of a Mac with a T2 \/ Apple Silicon chip is usually more complicated (hardware-bound encryption). An <em>external<\/em> disk without FileVault is the happy path for this how-to.<\/p>\n<h2>Unmounting<\/h2>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo umount \/mnt\/mac\n<\/code><\/pre>\n<p>If FUSE hangs: <code data-no-translation=\"\">sudo umount -l \/mnt\/mac<\/code>.<\/p>\n<h2>References<\/h2>\n<ul>\n<li><a href=\"\/en\/2017\/04\/novo-sistema-de-arquivos-da-apple\/\">Apple's new filesystem (APFS)<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/linux-apfs\/linux-apfs-rw\">linux-apfs-rw<\/a> \u2014 APFS module (DKMS)<\/li>\n<li><a href=\"https:\/\/github.com\/sgan81\/apfs-fuse\">apfs-fuse<\/a> \u2014 FUSE, reading + password<\/li>\n<li><a href=\"https:\/\/help.ubuntu.com\/community\/hfsplus\">Ubuntu help \u2014 HFS+<\/a><\/li>\n<li>Original Ask Ubuntu post: <a href=\"https:\/\/askubuntu.com\/questions\/332315\/how-to-read-and-write-hfs-journaled-external-hdd-in-ubuntu\">mounting journaled HFS+<\/a><\/li>\n<\/ul>\n<p>Summary: <code data-no-translation=\"\">lsblk -f<\/code> first. HFS+ with <code data-no-translation=\"\">hfsprogs<\/code>. APFS with <code data-no-translation=\"\">apfs-dkms<\/code>, read-only. FileVault: <code data-no-translation=\"\">apfs-fuse<\/code> or, better yet, a Mac that still boots.<\/p>","protected":false},"excerpt":{"rendered":"<p>Connected a Mac HDD\/SSD to 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 \u2014 and the kernel \u2026 <a title=\"Mac partition on Ubuntu\" class=\"read-more\" href=\"https:\/\/www.linuxpro.com.br\/en\/2017\/04\/hd-do-mac-ubuntu\/\" aria-label=\"Read more about Parti\u00e7\u00e3o do Mac no Ubuntu\">Read more<\/a><\/p>","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75,2,52,3],"tags":[77,159,14,4,53,5],"class_list":["post-118","post","type-post","status-publish","format-standard","hentry","category-apfs","category-linux","category-mac","category-ubuntu","tag-apfs","tag-hfsplus","tag-howto","tag-linux","tag-mac","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/comments?post=118"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/118\/revisions"}],"predecessor-version":[{"id":1363,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/118\/revisions\/1363"}],"wp:attachment":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/media?parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/categories?post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/tags?post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}