# 23.4.MacOS® 文件系统

FreeBSD 提供了对 MacOS® 文件系统的支持，包括 HFS/HFS+，从而可以访问为 Apple® 系统格式化的存储设备。

## 23.4.1. HFS/HFS+ 文件系统

HFS/HFS+ 是 MacOS 在 APFS 问世前的主要文件系统，常见于较旧的 Mac 设备和外部硬盘。FreeBSD 通过 [filesystems/hfsfuse](https://cgit.freebsd.org/ports/tree/filesystems/hfsfuse/) 软件包提供了对 HFS/HFS+ 的只读支持。

要在 FreeBSD 上使用 HFS/HFS+，需安装 [filesystems/hfsfuse](https://cgit.freebsd.org/ports/tree/filesystems/hfsfuse/) 软件包，加载 FUSE 内核模块，并按如下方式挂载文件系统：

安装 HFS/HFS+ 软件包：

```shell-session
# pkg install fusefs-hfsfuse
```

在使用 FUSE 文件系统前，需加载 [fusefs(4)](https://man.freebsd.org/cgi/man.cgi?query=fusefs\&sektion=4\&format=html) 内核模块：

```shell-session
# kldload fusefs
```

使用 [sysrc(8)](https://man.freebsd.org/cgi/man.cgi?query=sysrc\&sektion=8\&format=html) 设置开机自动加载该模块：

```shell-session
# sysrc kld_list+=fusefs
```

通过指定其 FreeBSD 分区名和一个已存在的挂载点来挂载 HFS/HFS+ 卷。以下示例将 **/dev/ada0s1** 挂载到 **/mnt**：

```shell-session
# hfsfuse /dev/ada0s1 /mnt
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.bsdcn.org/hanbook/di-23-zhang-qi-ta-wen-jian-xi-tong/23.4-macos.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
