# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper 安装 dosfstools

查看 dosfstools 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:dosfstools
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install dosfstools
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dosfstools
```

  证据: MacPorts ports tree: sysutils/dosfstools/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add dosfstools
```

  证据: Alpine Linux edge package indexes: dosfstools from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install dosfstools
```

  证据: Debian stable package indexes: dosfstools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install dosfstools
```

  证据: Fedora Rawhide package metadata: dosfstools from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#dosfstools
```

  证据: nixpkgs package indexes: pkgs/by-name/do/dosfstools/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S dosfstools
```

  证据: Arch Linux sync databases: dosfstools from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz

- zypper (92%):

```sh
sudo zypper install dosfstools
```

  证据: openSUSE Tumbleweed package metadata: dosfstools from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:dosfstools
- **软件包管理器:** Homebrew
- **版本:** 4.2
- **来源摘要:** Tools to create, check and label file systems of the FAT family
- **主页:** <https://github.com/dosfstools>
- **仓库:** <https://github.com/dosfstools/dosfstools>
- **最后更新:** 2026-08-02T15:56:45+09:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- dosfsck (别名)
- dosfslabel (别名)
- fatlabel (别名)
- fsck.fat (别名)
- fsck.msdos (别名)
- fsck.vfat (别名)
- mkdosfs (别名)
- mkfs.fat (别名)
- mkfs.msdos (别名)
- mkfs.vfat (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 4.2
## 项目历史与用法

dosfstools is the small system-tool collection behind mkfs.fat, fsck.fat, and fatlabel, used to create, check, and label FAT-family filesystems. It sits at the practical boundary between Unix-like systems and decades of DOS/Windows-compatible removable media.

### 项目历史

The official source tree records mkfs.fat lineage beginning with Linus Torvalds in 1991 and fsck.fat lineage beginning with Werner Almesberger in 1993. Later copyright history in the source credits work by Remy Card, David Hudson, H. Peter Anvin, Roman Hodek, Daniel Baumann, Andreas Bombe, and Pali Rohár.

Roman Hodek's 1998 work added or fixed major FAT features such as Atari format support, larger filesystems, and FAT32 support. The modern project now presents itself as a GPLv3-or-later suite consisting of mkfs.fat, fsck.fat, and fatlabel.

The NEWS file shows a portability turn in version 4.0 in 2016: Linux-specific assumptions were reduced, the build moved to autotools, and the tools were tested on FreeBSD and OS X. Version 4.1 added a test suite in 2017, and version 4.2 in 2021 expanded fatlabel behavior, FAT label compatibility, repair prompts, Year 2038 fixes, and many fsck/mkfs correctness details.

### 采用历史

dosfstools became infrastructure because FAT filesystems remained common on USB drives, SD cards, firmware update media, cameras, and Windows-compatible exchange volumes. Source facts list packaging across apk, Homebrew, Debian, Fedora, MacPorts, Nix, pacman, Ubuntu, and zypper.

Compatibility symlinks keep older command names such as dosfsck, fsck.msdos, fsck.vfat, mkdosfs, mkfs.msdos, mkfs.vfat, and dosfslabel available for distributions and scripts that predate the current mkfs.fat/fsck.fat/fatlabel naming.

### 使用方式

The commands create FAT filesystems, check and repair FAT filesystems, and read or write labels and volume IDs. They are normally used by administrators, installers, image-building scripts, and packaging workflows that need FAT-formatted media or disk images.

Release notes emphasize edge-case correctness: volume label compatibility with MS-DOS and Windows variants, FAT12/FAT16/FAT32 cluster handling, sparse-file test images, CHS geometry for SD cards, MBR helper behavior, and repair behavior for corrupt FAT tables.

### 为什么软件包爱好者会关心

dosfstools is package-nerd significant because it is boring in exactly the valuable way: a tiny suite of root-adjacent utilities that must encode filesystem folklore from DOS, Windows, Linux, SD cards, Atari variants, and old command names.

The 2016 portability work is especially relevant for Homebrew and MacPorts: it turned a historically Linux-centered tool into something more natural to ship on other Unix-like systems.

### 时间线

- 1991: mkfs.fat lineage begins with Linus Torvalds' FAT/MS-DOS filesystem creation utility.
- 1993: fsck.fat lineage begins with Werner Almesberger's FAT checker.
- 1998: Roman Hodek adds Atari format support, FAT32 support, and large-filesystem work.
- 2015: Version 3.0.28 makes fsck.fat default to interactive repair mode.
- 2016: Version 4.0 makes the tools portable beyond Linux and converts the build to autotools.
- 2017: Version 4.1 adds a test suite.
- 2021: Version 4.2 expands fatlabel, fsck, mkfs, compatibility, and Year 2038 handling.

### Related projects

- dosfstools is related to the Linux FAT/vfat/msdos filesystem stack, mtools, historical DOS/Windows FAT implementations, SD-card formatting expectations, and the older compatibility command names dosfsck, mkdosfs, and dosfslabel.

### 来源

- <https://github.com/dosfstools/dosfstools>
- <https://raw.githubusercontent.com/dosfstools/dosfstools/master/NEWS>
- <https://raw.githubusercontent.com/dosfstools/dosfstools/master/src/mkfs.fat.c>
- <https://raw.githubusercontent.com/dosfstools/dosfstools/master/src/fsck.fat.c>
- <https://formulae.brew.sh/formula/dosfstools>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Debian apt - dosfstools - 4.2-1.2: normalized package name match | Debian stable package indexes: dosfstools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | utilities for making and checking MS-DOS FAT filesystems | https://github.com/dosfstools/dosfstools
- Nix - dosfstools: normalized package name match | nixpkgs package indexes: pkgs/by-name/do/dosfstools/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - dosfstools - 4.2-1.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: dosfstools from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | utilities for making and checking MS-DOS FAT filesystems | https://github.com/dosfstools/dosfstools
- apk - dosfstools - 4.2-r2: normalized package name match | Alpine Linux edge package indexes: dosfstools from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | DOS filesystem utilities | https://github.com/dosfstools/dosfstools
- apk - dosfstools-doc - 4.2-r2: normalized package name match | Alpine Linux edge package indexes: dosfstools-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | DOS filesystem utilities (documentation) | https://github.com/dosfstools/dosfstools
- dnf - dosfstools - 4.2-19.fc45: normalized package name match | Fedora Rawhide package metadata: dosfstools from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Utilities for making and checking MS-DOS FAT filesystems on Linux | https://github.com/dosfstools/dosfstools
- pacman - dosfstools - 4.2-5: normalized package name match | Arch Linux sync databases: dosfstools from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | DOS filesystem utilities | https://github.com/dosfstools/dosfstools
- zypper - dosfstools - 4.2-4.13: normalized package name match | openSUSE Tumbleweed package metadata: dosfstools from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Utilities for Making and Checking MS-DOS FAT File Systems on Linux | https://github.com/dosfstools/dosfstools
- MacPorts - dosfstools: normalized package name match | MacPorts ports tree: sysutils/dosfstools/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/dosfstools.yml](https://github.com/mxcl/pkgdb/blob/main/combined/dosfstools.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
